]> xenbits.xensource.com Git - qemu-xen-3.3-testing.git/commitdiff
Reintroduced vcpus option (lost in merge)
authorIan Jackson <iwj@mariner.uk.xensource.com>
Thu, 12 Jun 2008 15:12:36 +0000 (16:12 +0100)
committerIan Jackson <Ian.Jackson@eu.citrix.com>
Thu, 12 Jun 2008 15:12:36 +0000 (16:12 +0100)
vl.c
xen-config-host.h

diff --git a/vl.c b/vl.c
index b4c0eec5addd7ddbb9299be5e53ff9ed048c2c5b..155e7028d574936a297a771a1457ebf9b67653f6 100644 (file)
--- a/vl.c
+++ b/vl.c
@@ -7236,6 +7236,7 @@ static void help(int exitcode)
            "-disable-opengl disable OpenGL rendering, using SDL"
 #endif
           "-direct-pci s   specify pci passthrough, with configuration string s\n"
+           "-vcpus          set CPU number of guest platform\n"
 #ifdef TARGET_I386
            "-no-fd-bootchk  disable boot signature checking for floppy disks\n"
 #endif
@@ -7431,6 +7432,7 @@ enum {
     QEMU_OPTION_domid,
     QEMU_OPTION_disable_opengl,
     QEMU_OPTION_direct_pci,
+    QEMU_OPTION_vcpus,
     QEMU_OPTION_pidfile,
     QEMU_OPTION_no_kqemu,
     QEMU_OPTION_kernel_kqemu,
@@ -7539,6 +7541,7 @@ const QEMUOption qemu_options[] = {
 #ifdef CONFIG_OPENGL
     { "disable-opengl", 0, QEMU_OPTION_disable_opengl },
 #endif CONFIG_OPENGL
+    { "vcpus", 1, QEMU_OPTION_vcpus },
     { "direct_pci", HAS_ARG, QEMU_OPTION_direct_pci },
     { "pidfile", HAS_ARG, QEMU_OPTION_pidfile },
     { "win2k-hack", 0, QEMU_OPTION_win2k_hack },
@@ -8298,6 +8301,10 @@ int main(int argc, char **argv)
             case QEMU_OPTION_direct_pci:
                direct_pci = optarg;
                 break;
+            case QEMU_OPTION_vcpus:
+                vcpus = atoi(optarg);
+                fprintf(logfile, "qemu: the number of cpus is %d\n", vcpus);
+                break;
             case QEMU_OPTION_pidfile:
                 pid_file = optarg;
                 break;
index 3a5da7e119176485eaa14787b49ca17d0b2654bc..569fc5626c5db418b1cb65659a824d3f4c17d003 100644 (file)
@@ -21,3 +21,4 @@ extern int domid;
 
 extern int xc_handle;
 extern int xen_pause_requested;
+extern int vcpus;