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 19:05:55 +0000 (UTC)

 qemu-system-ppc -M mac99 -m 768 -cdrom /dev/sr0 -bios '/media/jam/D4A3-539C/openbios-qemu.elf'  -enable-kvm -cpu 7410 -boot c -prom-env 'auto-boot?=true'  -prom-env 'boot-args=-v debug=0xffe kdp=2' -drive file=Tiger.qcow2,format=qcow2 -device usb-mouse -device usb-kbd -g 800x600x32 -netdev user,id=network0 -device rtl8139,netdev=network0 -vnc 127.0.0.1:1 -vga none -serial stdio

>> =============================================================
>> OpenBIOS 1.1 [Jan 19 2018 11:00]
>> Configuration device id QEMU version 1 machine id 1
>> CPUs: 1
>> Memory: 768M
>> UUID: 00000000-0000-0000-0000-000000000000
>> CPU type PowerPC,74xx
milliseconds isn't unique.
Output device screen not found.
Output device screen not found.
Trying hd:,\\:tbxi...
>> switching to new context:
NULL ihandle
Unexpected client interface exception: -2
call-method slw_update_keymap: exception -21
>> call-method slw_update_keymap failed with error ffffffdf
call-method slw_update_keymap: exception -21
>> call-method slw_update_keymap failed with error ffffffdf
kprintf initialized
max_mem: 768 M
version_variant = 0
version         = Darwin Kernel Version 8.0.0: Sat Mar 26 14:15:22 PST 2005; root:xnu-792.obj~1/RELEASE_PPC

proc version    = 800c1104
initialize_screen: b=00000000, w=00000000, h=00000000, r=00000000
initialize_screen: No video - forcing serial mode
standard timeslicing quantum is 10000 us
pmap_steal_memory: 00C07000 - 00C08000; size=00001000
pmap_steal_memory: 00C08000 - 00D0B000; size=00103000
pmap_steal_memory: 00D0B000 - 00D0E000; size=00003000
pmap_steal_memory: 00D0E000 - 00E0E000; size=00100000
pmap_steal_memory: 00E0E000 - 01605BF8; size=007F7BF8
vm_page_bootstrap: 189882 free pages
mig_table_max_displ = 70
MacRISC2PE::PMInstantiatePowerDomains - getting pmtree property
MacRISC2PE::PMInstantiatePowerDomains - got pmtree property
IOPlatformFunctionDriver::start
Copyright (c) 1982, 1986, 1989, 1991, 1993
    The Regents of the University of California. All rights reserved.

using 1966 buffer headers and 1966 cluster IO buffer headers
Extension "com.apple.driver.KeyLargoATA" has no kernel dependency.
MacRISC2CPU::initCPU 0 Here!
Register MacRISC2CPU 0 to acknowledge power changes
USBF:    34920.358    AppleUSBOHCI[0x1748800]::start OHCI controller will be unloaded across sleep
AppleCuda::start being calledAppleCuda:  VIA base = 26d08000
Security auditing service present
BSM auditing present
Initing 15 protosw entries
disabled
rooting via boot-uuid from /chosen: 6E314F53-6DF2-343D-8BA0-EFB3F3B3DD32
Waiting on <dict ID="0"><key>IOProviderClass</key><string ID="1">IOResources</string><key>IOResourceMatch</key><string ID="2">boot-uuid-media</string></dict>
ADB present:c
Attached protocol 30 to lo0 - 0
AppleCuda::start exiting normally
Got boot device = IOService:/MacRISC2PE/address@hidden/AppleMacRiscPCI/address@hidden/AppleKeyLargo/address@hidden/KeyLargoATA/address@hidden/IOATABlockStorageDriver/IOATABlockStorageDevice/IOBlockStorageDriver/QEMU HARDDISK Media/IOApplePartitionScheme/address@hidden
BSD root: disk0s10, major 14, minor 9
jnl: replay_journal: from: 4311040 to: 2903040 (joffset 0x11c000)
Attached protocol 2 to lo0 - 0
Jan 19 13:42:21 launchd: ioctl(SIOCAIFADDR ipv6): File exists
Checking disk
fsck_hfs: Volume is journaled.  No checking performed.
fsck_hfs: Use the -f option to force checking.
Mounting local filesystems
kern.sysv.shmmax: -1 -> 4194304
kern.sysv.shmmin: -1 -> 1
kern.sysv.shmmni: -1 -> 32
kern.sysv.shmseg: -1 -> 8
kern.sysv.shmall: -1 -> 1024
Resetting files and devices
Starting virtual memory
Removing /mach.sym /var/tmp/folders.* /etc/nologin /private/_tmp_ /var/_run_ /private/var/vm/swapfile0
\mach.sym
Configuring kernel extensions
Jettisoning kernel linker.
Jan 19 13:42:38 kextd[25]: registering service "com.apple.KernelExtensionServer"
Resetting IOCatalogue.
Matching service count = 0
Matching service count = 1
Matching service count = 1
Matching service count = 1
Matching service count = 1
Jan 19 13:42:43 kextd[25]: 308 cached, 0 uncached personalities to catalog
Register IOPlatformMonitor to acknowledge power changes
Jan 19 13:43:23 kextd-parent[24]: IOKitWaitQuiet() timed out
Jan 19 13:43:36 localhost mDNSResponder-107 (Mar 20 2005 20: 31:47)[48]: starting
Jan 19 13:43:40 localhost DirectoryService[46]: Launched version 1.8 (v346)
com_apple_driver_RTL8139: Ethernet address 52:54:00:12:34:56
Jan 19 13:43:54 localhost mDNSResponder: mDNSPlatformSendUDP sendto failed to send packet on InterfaceID 01807800   lo0/4 to 224.0.0.251:5353 skt 9 error -1 errno 65 (No route to host) 3189646094
Jan 19 13:43:55 localhost mDNSResponder: mDNSPlatformSendUDP sendto failed to send packet on InterfaceID 01807800   lo0/4 to 224.0.0.251:5353 skt 9 error -1 errno 65 (No route to host) 3189646561
Jan 19 13:43:55 localhost mDNSResponder: mDNSPlatformSendUDP sendto failed to send packet on InterfaceID 01807800   lo0/4 to 224.0.0.251:5353 skt 9 error -1 errno 65 (No route to host) 3189646808
Jan 19 13:43:55 localhost mDNSResponder: mDNSPlatformSendUDP sendto failed to send packet on InterfaceID 01807800   lo0/4 to 224.0.0.251:5353 skt 9 error -1 errno 65 (No route to host) 3189646941
Jan 19 13:43:55 localhost mDNSResponder: mDNSPlatformSendUDP sendto failed to send packet on InterfaceID 01807800   lo0/4 to 224.0.0.251:5353 skt 9 error -1 errno 65 (No route to host) 3189647193
Jan 19 13:43:55 localhost mDNSResponder: mDNSPlatformSendUDP sendto failed to send packet on InterfaceID 01807800   lo0/4 to 224.0.0.251:5353 skt 9 error -1 errno 65 (No route to host) 3189647193
Jan 19 13:43:55 localhost mDNSResponder: Adding browse domain local.
Jan 19 13:43:56 localhost mDNSResponder: mDNSPlatformSendUDP sendto failed to send packet on InterfaceID 01807800   lo0/4 to 224.0.0.251:5353 skt 9 error -1 errno 65 (No route to host) 3189647455
Jan 19 13:43:56 localhost mDNSResponder: mDNSPlatformSendUDP sendto failed to send packet on InterfaceID 01807800   lo0/4 to 224.0.0.251:5353 skt 9 error -1 errno 65 (No route to host) 3189647810
Jan 19 13:43:57 localhost mDNSResponder: mDNSPlatformSendUDP sendto failed to send packet on InterfaceID 01807800   lo0/4 to 224.0.0.251:5353 skt 9 error -1 errno 65 (No route to host) 3189648458
Jan 19 13:43:58 localhost mDNSResponder: mDNSPlatformSendUDP sendto failed to send packet on InterfaceID 01807800   lo0/4 to 224.0.0.251:5353 skt 9 error -1 errno 65 (No route to host) 3189649812
AppleCuda_AutoRestartOnPowerLossSetting - entered
Attached protocol 30 to en0 - 0
Attached protocol 2 to en0 - 0
in.c: warning can't plumb proto if=en0 type 6 error=17

Not sure what the issue is, seems to be related to the CUDA restart on power loss, I can boot the install dvd fine and install, but I have issues booting the HD after install. I was able to boot once, and everything works fine, but now the system won't boot again.





I added my cpu to /qemu/target/ppc/cpu-models.c

POWERPC_DEF("7457a_v1.5",    CPU_POWERPC_74x7A_v15,              7455,
                "PowerPC 7457A v1.5 (G4)")
And added  /qemu/target/ppc/cpu-models.h

 CPU_POWERPC_74x7A_v15          = 0x80030105, /* aka D: 1.5 */

Now -cpu host works, but the system hangs at bootX

qemu-system-ppc -M mac99 -m 768 -cdrom /dev/sr0 -bios '/media/jam/D4A3-539C/openbios-qemu.elf'  -enable-kvm -cpu host -boot c -prom-env 'auto-boot?=false' -serial stdio -prom-env 'boot-args=-v debug=0xffe kdp=2' -drive file=Tiger.qcow2,format=qcow2 -device usb-mouse -device usb-kbd -g 800x600x32 -netdev user,id=network0 -device rtl8139,netdev=network0

>> =============================================================
>> OpenBIOS 1.1 [Jan 19 2018 11:00]
>> Configuration device id QEMU version 1 machine id 1
>> CPUs: 1
>> Memory: 768M
>> UUID: 00000000-0000-0000-0000-000000000000
>> CPU type PowerPC,G4
milliseconds isn't unique.
>> switching to new context:
>> call-method slw_update_keymap failed with error ffffffdf
>> call-method slw_update_keymap failed with error ffffffdf



Can't seem to boot Ubuntu Mate 16.04 CD ether just hangs while loading the
bootinfo.txt, booting with -nographic loads yaboot, but boot seems to hang while creating the ramdisk.

Booting OS X Tiger with kvm and cpu 7410 hangs:



On Friday, January 19, 2018, 7:39:06 AM EST, Jd Lyons <address@hidden> wrote:




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]