diff options
author | Andre Przywara <andre.przywara@amd.com> | 2009-08-19 15:42:40 +0200 |
---|---|---|
committer | Anthony Liguori <aliguori@us.ibm.com> | 2009-08-27 19:33:15 -0500 |
commit | 7002c1c3c6a5ec92c2aca209b3834535f6be0f54 (patch) | |
tree | d20cf2527b1b5e400b5392c6dc8e0a5155870ebd /cpu-defs.h | |
parent | 77cab1273078d59b0ee448a999f88fac2170d379 (diff) | |
download | qemu-7002c1c3c6a5ec92c2aca209b3834535f6be0f54.tar.gz qemu-7002c1c3c6a5ec92c2aca209b3834535f6be0f54.tar.bz2 qemu-7002c1c3c6a5ec92c2aca209b3834535f6be0f54.zip |
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>
Diffstat (limited to 'cpu-defs.h')
-rw-r--r-- | cpu-defs.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/cpu-defs.h b/cpu-defs.h index 5b80b1b360..b6c8b955c1 100644 --- a/cpu-defs.h +++ b/cpu-defs.h @@ -185,6 +185,8 @@ typedef struct CPUWatchpoint { int cpu_index; /* CPU index (informative) */ \ uint32_t host_tid; /* host thread ID */ \ int numa_node; /* NUMA node this cpu is belonging to */ \ + int nr_cores; /* number of cores within this CPU package */ \ + int nr_threads;/* number of threads within this CPU */ \ int running; /* Nonzero if cpu is currently running(usermode). */ \ /* user data */ \ void *opaque; \ |