qemu-ppc
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-ppc] KVM on PPC host


From: Jd Lyons
Subject: Re: [Qemu-ppc] KVM on PPC host
Date: Fri, 19 Jan 2018 07:39:06 -0500



On Jan 17, 2018, at 6:11 AM, Jd Lyons <address@hidden> wrote:



On Jan 17, 2018, at 3:28 AM, Mark Cave-Ayland <address@hidden> wrote:

On 16/01/18 12:06, Jd Lyons wrote:

First, it seems someone changed something in the master in the last few days that broke linking when building on linux PPC.
I pulled the master a few days ago, and it still builds and links fine, but something has broken it now, please fix.
  LINK    ppc-softmmu/qemu-system-ppc
../migration/postcopy-ram.o: In function `mark_postcopy_blocktime_end':
/home/jam/qemu2/qemu-master/migration/postcopy-ram.c:717: undefined reference to `__atomic_fetch_add_8'
/home/jam/qemu2/qemu-master/migration/postcopy-ram.c:738: undefined reference to `__atomic_fetch_add_8'
../migration/postcopy-ram.o: In function `mark_postcopy_blocktime_begin':
/home/jam/qemu2/qemu-master/migration/postcopy-ram.c:651: undefined reference to `__atomic_exchange_8'
/home/jam/qemu2/qemu-master/migration/postcopy-ram.c:652: undefined reference to `__atomic_exchange_8'
/home/jam/qemu2/qemu-master/migration/postcopy-ram.c:661: undefined reference to `__atomic_exchange_8'
collect2: error: ld returned 1 exit status
Makefile:193: recipe for target 'qemu-system-ppc' failed
make[1]: *** [qemu-system-ppc] Error 1
Makefile:387: recipe for target 'subdir-ppc-softmmu' failed
make: *** [subdir-ppc-softmmu] Error 2

Unless someone else is aware, you might need to bisect this. Perhaps post the above output along with compiler and version to qemu-devel as it could easily have been introduced via a non-PPC patch?

I think this was something I did, rather than a patch, unless someone removed -wl or some such from the LDFLAGS. At any rate, I moved from Debian 8.10 to Ubuntu Mate 16.04 LTS, and I no longer get link errors from the master.

Also, it seems with KVM I can't use -cpu host with qemu-system-ppc or qemu-system-ppc64, I've read a few people on the web where able to use this, but it doesn't work for me on a Powerbook G4 with Debian 8.10 host, with kernel 4.14.13.
qemu-system-ppc64: unable to find CPU model 'host'
qemu-system-ppc: unable to find CPU model 'host'
Not sure if something changed from older verssions, or I need to add something to ./configure to get -cpu host to work?

Perhaps one of the PPC guys can confirm how/why this has changed?

Maybe it never worked on 32bit hosts, the only reports I read were on a G5 host with qemu-system-ppc64, and one on a pseries CPU. I only have 32bit PowerPC CPU to test with, I’ll revise it when I pick up a G5. 

Also, using -cpu G4 or -cpu 7410, -cpu G3, -cpu 604, with --enable-kvm results in this when booting the Mac OS 9.2.2 Retail CD:
KVM: unknown exit, hardware reason 80021070
NIP 0000000000000700   LR 00000000fbf15928 CTR 0000000000000000 XER 0000000020000100 CPU#0
MSR 0000000000000000 HID0 0000000000000000  HF 0000000000000000 iidx 3 didx 3
TB 00000000 00000000 DECR 00000000
GPR00 0000000000000000 000000000fbfe000 0000000000000000 0000000068fff000
GPR04 0000000068080000 000000000fee5000 0000000000000000 0000000000000000
GPR08 0000000000000000 0000000000000000 000000006806e908 000000000002d032
GPR12 000000006806e8b8 0000000000000000 0000000000000000 0000000000004010
GPR16 0000000000a80000 0000000049610008 0000000068ffffac 0000000068ffffb0
GPR20 0000000000000000 0000000000000000 0000000000f15eb4 00000000fbf15928
GPR24 000000000fbfe360 0000000000f1595c 0000000000000057 0000000068ffffac
GPR28 0000000000f15eb4 000000000fbfe000 00000000b0000023 000000000fbff112
CR 24202857  [ E  G  E  -  E  L  GO GO ]             RES ffffffffffffffff
FPR00 0000000000000000 0000000000000000 0000000000000000 0000000000000000
FPR04 0000000000000000 0000000000000000 0000000000000000 0000000000000000
FPR08 0000000000000000 0000000000000000 0000000000000000 0000000000000000
FPR12 0000000000000000 0000000000000000 0000000000000000 0000000000000000
FPR16 0000000000000000 0000000000000000 0000000000000000 0000000000000000
FPR20 0000000000000000 0000000000000000 0000000000000000 0000000000000000
FPR24 0000000000000000 0000000000000000 0000000000000000 0000000000000000
FPR28 0000000000000000 0000000000000000 0000000000000000 0000000000000000
FPSCR fff8000000000000
 SRR0 0000000000f13558  SRR1 0000000000000000    PVR 0000000000080301 VRSAVE 0000000000000000
SPRG0 000000000fbfe000 SPRG1 000000000fbfe000  SPRG2 0000000000f15eb4  SPRG3 000000000fbfe4e0
SPRG4 0000000000000000 SPRG5 0000000000000000  SPRG6 0000000000000000  SPRG7 0000000000000000
 SDR1 000000000fc0001f   DAR 0000000068ffffac  DSISR 0000000042000000
 With --enable-kvm qemu-system-ppc can boot Mac OS X Panther v10.3.0 CD, but installing fails. With Mac OS X Triger 10.4.x it boots and installs, but the install seems to get corrupted. Seems an issue with disk corruption with kvm enabled?
Even when I just use emulation of the G4, without kvm, system won't boot to the 10.3 installer.

Is this under qemu-system-ppc or qemu-system-ppc64? I'm presuming the former. Regarding the G4 CPU I'm not sure whether that's a compatible setup for the given MacOS version and ROM, but someone else would need to confirm…

Yes, my host CPU is a 7447a, so it’s not really supported in the Mac OS Rom, I’ll do  a little hacking and see…..


Seems there is some bad reversion going on in the latest builds from the master as far as Linux PPC 32bit hosts.

I remember when Alex did the initial MacOS X work back around 2015 he seemed confident that things were working well then, so it might be that you need to go back a few years to see where things started to go amiss.

Regarding OS 9 IIRC the issue there was related to KVM not supporting the correct MMU modes (which is likely given that the new MMU index code tended to break OS 9 as it was being developed) so that might require some kernel work.

Given that very few people have access to your hardware there's a fair chance that you'll need to do quite a bit of the investigation work yourself, but there are people around who can point you in the right direction.



Thanks Mark, likely not much of this was ever tested on 32bit CPU’s, I’ll see if I can debug it.


ATB,

Mark.

Ok, I got Tiger to install and boot by doing a little hacking in the command line in Openbios, but I have to use the -cpu 7410 command then:

>0 dev /cpus/@0
>0 80030105 encode-int “ cpu-version” property
>0 “ PowerPC,G4” encode-string “ model” property

This seems to be the most stable, I did a little hacking to Openbios and added support for the 7447a cpu, but BootX just hangs forever, so it seems 7447a support is incomplete in Qemu-PPC.

So I have a few question:

What do we need to do to get the 7447a working?

Where is the -cpu host support in Qemu-PPC, meaning what file or files do I need to edit to add support for this in 32bit binaries?

I’m just assuming that as I’ve read reports that this works for people when they build 64bit bianaries of qemu-system-ppc and emu-system-ppc64 that for some reason the code for KVM cpu host support just isn’t building into the 32bit binaries.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]