Skip to content

: Introduce multi-core and multi-thread support for guests

Andre Przywara qemu-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 6 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3extend -smp parsing to include cores= and threads= optionscpu-defs.h vl.c+59 -90 replies
2/3push CPUID level to 4 to allow Intel multicore decodingtarget-i386/helper.c+2 -27 replies
3/3set CPUID bits to present cores and threads topologytarget-i386/helper.c+25 -30 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [Qemu-devel] [PATCH 0/3]: Introduce multi-core and multi-thread support for guests

Hi,

currently QEMU's -smp <n> option only injects multiple CPU sockets into the guest. Some operating systems(TM) restrict the number of "real" CPU sockets for licensing reasons, but allow multi-core CPUs. This patch extends the -smp option to let the user specify a topology:
-smp <smp_value>[,cores=<nrcores>][,threads=<nrthreads>]

	[,sockets=<nrsockets>][,maxcpus=<max_hotplug_cpus>]

The <smp_value> is the legacy number of virtual CPUs QEMU emulates. If any of the cores, threads or sockets option is given, this value can be omitted. Missing values are calculated to fulfill:
smp_value = nrsockets * nrcores * nrthreads
Where in doubt it will favor multiple sockets over multiple cores over multiple threads (to mimic the current behavior).
The entered values will be propagated to the CPUID emulation, where the corresponding bits will be set (both for Intel and AMD processors). These patches are againt QEMU HEAD, but should apply against qemu-kvm, too.

Please review, comment and apply!

Thanks,
Andre.

Signature · 9 lines
Andre Przywara
AMD-Operating System Research Center (OSRC), Dresden, Germany
Tel: +49 351 448 3567 12
----to satisfy European Law for business letters:
Advanced Micro Devices GmbH
Karl-Hammerschmidt-Str. 34, 85609 Dornach b. Muenchen
Geschaeftsfuehrer: Thomas M. McCoy; Giuliano Meroni
Sitz: Dornach, Gemeinde Aschheim, Landkreis Muenchen
Registergericht Muenchen, HRB Nr. 43632