[libvirt] [PATCH 2/5] qemu: parse: Allow the 'cpus=' prefix for current cpu number

Peter Krempa pkrempa at redhat.com
Mon Nov 14 16:53:48 UTC 2016


qemu allows following syntax:

  -smp [cpus=]n[,cores=cores][,threads=threads][,sockets=sockets][,maxcpus=maxcpus]

Allow the "cpus" prefix.
---
 src/qemu/qemu_parse_command.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/qemu/qemu_parse_command.c b/src/qemu/qemu_parse_command.c
index b19c523..98051be 100644
--- a/src/qemu/qemu_parse_command.c
+++ b/src/qemu/qemu_parse_command.c
@@ -1694,6 +1694,8 @@ qemuParseCommandLineSmp(virDomainDefPtr dom,
                 threads = n;
             else if (STREQ(kws[i], "maxcpus"))
                 maxcpus = n;
+            else if (STREQ(kws[i], "cpus"))
+                vcpus = n;
             else
                 goto syntax;
         }
-- 
2.10.2




More information about the libvir-list mailing list