From 330350a67d512b7bfc3d1e649175f5a2682f892d Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Thu, 12 Jun 2008 16:12:36 +0100 Subject: [PATCH] Reintroduced vcpus option (lost in merge) --- vl.c | 7 +++++++ xen-config-host.h | 1 + 2 files changed, 8 insertions(+) diff --git a/vl.c b/vl.c index b4c0eec5..155e7028 100644 --- 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; diff --git a/xen-config-host.h b/xen-config-host.h index 3a5da7e1..569fc562 100644 --- a/xen-config-host.h +++ b/xen-config-host.h @@ -21,3 +21,4 @@ extern int domid; extern int xc_handle; extern int xen_pause_requested; +extern int vcpus; -- 2.39.5