aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnthony Liguori <aliguori@us.ibm.com>2008-02-21 15:38:24 -0600
committerAvi Kivity <avi@qumranet.com>2008-02-24 12:16:18 +0200
commita393f83bd52661432ecbcb303dab38f0cead9ca9 (patch)
treeef7b57969c8d7f356459b5173216f5657bf8549e
parent27cafe9a61c7188cc15bfb0a1cb5c21872ac5a4e (diff)
Allow kvm to use more than 4 VCPUs
This patch actually allows KVM to be used with more than 4 VCPUs. The change in qemu-kvm.c was pretty difficult to find because it was using an open coded array size of 4. I changed that array to be 256 since that's the real maximum on x86 and the additional storage space is a pretty trivial cost. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Avi Kivity <avi@qumranet.com>
-rw-r--r--kvm/libkvm/kvm-common.h2
-rw-r--r--qemu-kvm.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/kvm/libkvm/kvm-common.h b/kvm/libkvm/kvm-common.h
index f4040be66..d4df1a4f5 100644
--- a/kvm/libkvm/kvm-common.h
+++ b/kvm/libkvm/kvm-common.h
@@ -19,7 +19,7 @@
/* FIXME: share this number with kvm */
/* FIXME: or dynamically alloc/realloc regions */
#define KVM_MAX_NUM_MEM_REGIONS 8u
-#define MAX_VCPUS 4
+#define MAX_VCPUS 16
/* kvm abi verison variable */
extern int kvm_abi;
diff --git a/qemu-kvm.c b/qemu-kvm.c
index 40564531d..98e92b9be 100644
--- a/qemu-kvm.c
+++ b/qemu-kvm.c
@@ -47,7 +47,7 @@ struct vcpu_info {
int signalled;
int stop;
int stopped;
-} vcpu_info[4];
+} vcpu_info[256];
CPUState *qemu_kvm_cpu_env(int index)
{