Skip to content

config(qemu): let PowerPC VMs start by limiting cores to what the board supports - #8184

Merged
osy merged 1 commit into
utmapp:mainfrom
UTMapp-bot:fix/ppc-single-cpu-machines
Nov 16, 2026
Merged

osy merged 1 commit into
utmapp:mainfrom
UTMapp-bot:fix/ppc-single-cpu-machines

Conversation

@UTMapp-bot

Copy link
Copy Markdown
Collaborator

A PowerPC VM whose core count is left at its default gets the host's performance cores, and QEMU refuses to start a board with more CPUs than it supports:

qemu-ppc-softmmu: Invalid SMP CPUs 8. The max CPUs supported by machine 'g3beige' is 1

g3beige (the default PowerPC machine) and mac99 take one CPU, so a PowerPC VM made with the defaults does not start on Apple Silicon. Only sam460ex was limited. This limits every ppc and ppc64 board to the cpu-max that QEMU 10.0 reports for it in query-machines: one CPU for 40p, amigaone, bamboo, g3beige, mac99, none, pegasos2, sam460ex and virtex-ml507, 15 for mpc8544ds and 32 for ppce500 (powernv and pseries take more than any host has). As for sam460ex, a configured count above the limit is limited too, since QEMU would not start with it.

The same error has been reported for mac99 before and still happens on 5.0.8 and main.

Testing

Tested by an AI agent on a Mac with M2 Max (8 performance cores), macOS 27, Xcode 27.1: a Debug universal build of this branch and of main (5d5e1b1), with dependencies built from the same tree.

  • Which limits: read from QMP query-machines (cpu-max) on every qemu-system-*-unsigned binary of that QEMU 10.0.12 build.
  • Before (main): VMs made through AppleScript (make new virtual machine, architecture ppc, machine g3beige, mac99 or 40p, core count not set) do not start: Invalid SMP CPUs 8. The max CPUs supported by machine 'g3beige' is 1 (same for mac99 and 40p). Released UTM 5.0.8 fails the same way.
  • After (this branch): the same script starts g3beige and mac99 with -smp cpus=1,sockets=1,cores=1,threads=1; both were still running after 20 s with OpenBIOS on the serial console. 40p gets past the CPU check and then stops on a different, pre-existing default ("RAM size incompatible with this board"), which this PR does not change. ppce500 with cpu cores 64 gets past machine setup and stops at an unrelated, pre-existing device error (Bus 'usb-bus.0' not found), so the limited count of 32 is covered by the unit test only.
  • Unit tests: new QemuArgumentsTests cases check -smp for every single-CPU board (default and configured count), the limit for mpc8544ds and ppce500, and that ppce500, mpc8544ds, pseries and powernv keep a configured count. With UTMQemuConfiguration+Arguments.swift restored to main they fail (32 assertions, e.g. ppc 40p: ["cpus=8", "cores=8", "threads=1"]); with the fix they pass. Full suite: macOS 288 tests, 0 failures; iOS simulator 217 passed, 0 failed.
  • Not tested: an Intel Mac host. The limit is applied after the host-specific count, so it covers both.

…rd supports

A PowerPC VM whose core count is left at its default got the host's
performance cores, and QEMU refuses to start a board with more CPUs than
it supports ("Invalid SMP CPUs 8. The max CPUs supported by machine
'mac99' is 1"). g3beige, the default PowerPC machine, and mac99 take one
CPU, so a PowerPC VM made with the defaults did not start on Apple
Silicon.

Only sam460ex was limited. Limit every ppc and ppc64 board to the
cpu-max that QEMU 10.0 reports for it in query-machines: one CPU for
40p, amigaone, bamboo, g3beige, mac99, none, pegasos2, sam460ex and
virtex-ml507, 15 for mpc8544ds and 32 for ppce500. As for sam460ex, a
configured count above the limit is limited too, since QEMU would not
start with it.

Assisted-by: Claude:claude-opus-5-5
@osy
osy merged commit 925de94 into utmapp:main Nov 16, 2026
31 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants