]> git.proxmox.com Git - mirror_qemu.git/commit - vl.c
extend -smp parsing to include cores= and threads= options
authorAndre Przywara <andre.przywara@amd.com>
Wed, 19 Aug 2009 13:42:40 +0000 (15:42 +0200)
committerAnthony Liguori <aliguori@us.ibm.com>
Fri, 28 Aug 2009 00:33:15 +0000 (19:33 -0500)
commitdc6b1c09849484fbbc50803307e4c7a3d81eab62
treed20cf2527b1b5e400b5392c6dc8e0a5155870ebd
parent5ac1fad324d869ab6971256aa56188ebac784e46
extend -smp parsing to include cores= and threads= options

For injecting multi-core and multi-threading CPU topology into guests
extend the -smp syntax to accommodate cores and threads specification.
Syntax: -smp smp_value[,cores=nr_cores][,threads=nr_threads]\
[,socket=nr_sockets][,maxcpus=max_cpus]
smp_value is the legacy value specifying the total number of vCPUs for
the guest. If you specify one of cores, threads or sockets this value
can be omitted. Missing values will be computed to fulfill:
smp_value = nr_cores * nr_threads * nr_sockets
where it will favour sockets over cores over threads (to mimic the
current behavior, which will only inject multiple sockets.)
So -smp 4,threads=2 will inject two sockets with 2 threads each,
-smp cores=4 is an abbreviation for -smp 4,cores=4,threads=1,sockets=1.
If max_cpus (the number of hotpluggable CPUs) is omitted, it will
be set to smp_value.

Signed-off-by: Andre Przywara <andre.przywara@amd.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
cpu-defs.h
vl.c