qemu-ppc
[Top][All Lists]
Advanced

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

Re: Qemu / KVM On Powermac G5 MP970


From: BALATON Zoltan
Subject: Re: Qemu / KVM On Powermac G5 MP970
Date: Thu, 19 Jan 2023 13:04:37 +0100 (CET)

Hello,

On Thu, 19 Jan 2023, Dan Whitehouse wrote:
I have very slowly started to look at this.
So far I have two guests which “work” with qemu (no kvm yet).

I have a MacOS 9 Guest which is virtually unusable due to poor mouse tracking:

#!/bin/bash

qemu-system-ppc64 \
 -L pc-bios \
 -boot c \
 -M mac99 \
 -m 1024 \
 -prom-env 'auto-boot?=true' \
 -prom-env 'boot-args=-v' \
 -prom-env 'vga-ndrv?=true' \
 -drive file=/srv/tmp/macos92-disk1.img,format=raw,media=disk \
 -netdev user,id=mynet0,net=192.168.76.0/24,dhcpstart=192.168.76.10 \
 -device sungem,netdev=mynet0 \
 -cpu 7400 \
 -monitor stdio

Perhaps more useful for testing I have a 32-bit Debian install:

#!/bin/bash

qemu-system-ppc \
 -L pc-bios \
 -boot c \
 -M mac99 \
 -cpu 7400 \
 -m 2048 \
 -prom-env 'auto-boot?=true' \
 -prom-env 'boot-args=-v' \
 -prom-env 'vga-ndrv?=true' \
 -drive file=/srv/tmp/debian_32bit.qcow2,format=qcow2,media=disk \
 -netdev user,id=mynet0,net=192.168.76.0/24,dhcpstart=192.168.76.10 \
 -device sungem,netdev=mynet0 \
 -monitor stdio

I suppose the first thing I need to get my head round is “qemu-system-ppc” vs. 
“qemu-system-ppc64”.
Initially I had been using the latter for both but found that the Debian machine would not boot properly and I could not log in (I think some bits of systemd were timing out in the guest preventing it from booting fully).

The difference between qemu-system-ppc and qemu-system-ppc64 should be that qemu-system-ppc64 also includes 64-bit PPC machines while the ppc one only 32-bit machines. But there are some internal differences and mac99 is a pathological case. Not only it does not emulate a real Mac, just some Mac hardware that may be close enough for some OSes to boot, it also behaves differently depending on -cpu and machine options. You have -cpu 7400 in the command line above so unless you omitted that in qemu-system-ppc64 command you should get the same machine. But if you run qemu-system-ppc64 -M mac99 without -cpu then you get a G5 Mac but it's not emulated very well. It's best to stick to qemu-system-ppc -M mac99,via=pmu -cpu G4 for now (the -cpu G4 is not needed with qemu-system-ppc but it does not hurt either and is needed with qemu-system-ppc64 to get a G4 Mac). This is approximately a PowerMac3,1 G4 AGP PowerMac so the guest should run on that machine but depending on the guest OS different options may work best. For emulating a G5 Mac you need qemu-system-ppc64 -M mac99 without -cpu but maybe only Linux can boot on this currently. (I have patches to introduce new machine types to make this less confusing and easier to select but they are not upstream yet.)

I haven’t tried yet, but I wonder if the former works better with the MacOS 9 
image.

I suppose that in both case the “7400” is a 32-bit CPU (is that right?) so therefore the former (qemu-system-ppc) makes sense?

Apart from the G4/G5 confusion in mac99 it may be better to start with a guest same as your host. Due to the problem described in https://www.talospace.com/2018/08/making-your-talos-ii-into-power-mac_29.html it may be problematic to run 32 bit PPC guest on 64 bit PPC host. Although this should be handled by KVM it's a possible source of error that's best avoided at first so I'd start with a 64 bit Linux guest, preferably the same as you run on your host. What's your host OS you're running all these tests on by the way? Then once you get the same Linux version working on KVM you can try a 32 bit one and then go on to other guests like MacOS.

The talospace blog has a lot of info on this, here's a summary article with links to all relevant posts:

https://www.talospace.com/2020/04/some-updated-notes-on-kvm.html

Probably you should read all those to get a better understanding how all this should work and may even try to contact that person over the comment section or some other contact that may be on that page for more info.

Regards,
BALATON Zoltan

reply via email to

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