qemu-system-amd64 max cpus is too low for latest processors
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
lxd (Ubuntu) |
New
|
Undecided
|
Unassigned | ||
Jammy |
New
|
Undecided
|
Unassigned | ||
Lunar |
Invalid
|
Undecided
|
Unassigned | ||
Mantic |
Won't Fix
|
Undecided
|
Unassigned | ||
Noble |
New
|
Undecided
|
Unassigned | ||
qemu (Ubuntu) |
Fix Released
|
Critical
|
Sergio Durigan Junior | ||
Jammy |
Fix Released
|
Undecided
|
Sergio Durigan Junior | ||
Lunar |
Invalid
|
Undecided
|
Sergio Durigan Junior | ||
Mantic |
Fix Released
|
Critical
|
Sergio Durigan Junior | ||
Noble |
Fix Released
|
Critical
|
Sergio Durigan Junior |
Bug Description
[ Impact ]
QEMU users on Ubuntu Jammy/Mantic who try to spawn a VM with more than 288 vCPUs will not be able to do so, because the machine types available don't support such scenario. The following error will happen:
qemu-system-x86_64: Invalid SMP CPUs 300. The max CPUs supported by machine 'pc-q35-jammy' is 288
[ Test Plan ]
Ideally, the test should be performed in a machine with more than 288 physical CPUs available. However, due to the difficulty in finding such systems, it is possible to emulate the usage of more than 288 vCPUs.
On a Jammy/Mantic machine, making sure to adjust the machine type accordingly, you can do:
$ sudo qemu-system-x86_64 -M pc-q35-
You will notice that the command will fail, as expected.
The proposed fix is to create a new machine type on Jammy/Mantic, in order to minimize the possibility of regressions in deployments using the existing machine types. This new type is named pc-{q35,
[ Where problems could occur ]
As explained above, a new machine type was created in order to minimize the possibility of regressions. As such, the existing "pc-{q35,
[ Original Description ]
During testing of an AMD Genoa CPU, it was discovered that qemu-system-amd64 doesn't support enough cpus.
The specific error the tester received was:
qemu-system-x86_64: Invalid SMP CPUs 384. The max supported by machine 'pc-q35-7.1' is 288
Looking at the sournce that seems to be an easy fix at first glance:
https:/
372 machine_
373 m->max_cpus = 288;
Related branches
- git-ubuntu bot: Approve
- Andreas Hasenack: Approve
- Canonical Server Reporter: Pending requested
-
Diff: 130 lines (+108/-0)3 files modifieddebian/changelog (+7/-0)
debian/patches/series (+1/-0)
debian/patches/ubuntu/lp2012763-maxcpus-too-low.patch (+100/-0)
- git-ubuntu bot: Approve
- Andreas Hasenack: Approve
- Canonical Server Reporter: Pending requested
-
Diff: 130 lines (+108/-0)3 files modifieddebian/changelog (+7/-0)
debian/patches/series (+1/-0)
debian/patches/ubuntu/lp2012763-maxcpus-too-low.patch (+100/-0)
- Andreas Hasenack: Approve
- Bryce Harrington (community): Needs Information
- Christian Ehrhardt : Pending requested
- Canonical Server Reporter: Pending requested
-
Diff: 89 lines (+67/-0)3 files modifieddebian/changelog (+7/-0)
debian/patches/series (+1/-0)
debian/patches/ubuntu/lp2012763-maxcpus-too-low.patch (+59/-0)
description: | updated |
description: | updated |
tags: | added: server-todo |
Changed in qemu (Ubuntu Jammy): | |
status: | New → In Progress |
Changed in qemu (Ubuntu Mantic): | |
status: | Confirmed → In Progress |
Changed in qemu (Ubuntu Noble): | |
status: | Confirmed → Fix Committed |
Hi Jeff,
thanks for the request, that is a known limit that is being worked on by various upstream projects.
The limit of 288 [1] was deliberately chosen for being the limits of testing at the time and limits of xapic [2].
There recently ~5.15 (which is jammy and later) has been a lift of thelimit on the kernel side [3][4], but that is only the first step.
You also need other components to be ready, like the smbios 3.0 entry point which is in seabios 1.16 (Kinetic and later) and edk2 (there it is rather old and should be ok for longer).
The work / discussions in qemu is ongoing as you might see in [5], but those haven't completed or landed yet - it is work in progress that has to complete and stabilize. You see here that would be a post 7.2 change anyway.
There are more things in the stack which might need patching e.g. in libvirt or even higher parts, I haven't checked those yet - but overall this isn't a "change a number and done" change :-/
I hope that the upstream projects can continue their great work and complete it all, but right now despite looking like a simple number there is not enough confidence for all the implications yet to just bump up that number.
[1]: https:/ /gitlab. com/qemu- project/ qemu/-/ commit/ 00d0f9fd6602a27 b204f672ef5bc8e 69736c7ff1 /lists. gnu.org/ archive/ html/qemu- devel/2016- 11/msg02266. html /git.kernel. org/pub/ scm/linux/ kernel/ git/torvalds/ linux.git/ commit/ ?id=074c82c8f7c f8a46c3b81965f1 22599e3a133450 /git.kernel. org/pub/ scm/linux/ kernel/ git/torvalds/ linux.git/ commit/ ?id=da1bfd52b93 0726288d58f066b d668df9ce15260
[2]: https:/
[3]: https:/
[4]: https:/
[5]: https://<email address hidden>/