Repository navigation
config(qemu): let PowerPC VMs start by limiting cores to what the board supports - #8184
Merged
Merged
Conversation
…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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:
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-maxthat QEMU 10.0 reports for it inquery-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.query-machines(cpu-max) on everyqemu-system-*-unsignedbinary of that QEMU 10.0.12 build.make new virtual machine, architectureppc, machineg3beige,mac99or40p, 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.-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 withcpu cores64 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.QemuArgumentsTestscases check-smpfor 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. WithUTMQemuConfiguration+Arguments.swiftrestored tomainthey 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.