From: Anthony Liguori <[EMAIL PROTECTED]>

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 <[EMAIL PROTECTED]>
Signed-off-by: Avi Kivity <[EMAIL PROTECTED]>

diff --git a/libkvm/kvm-common.h b/libkvm/kvm-common.h
index f4040be..d4df1a4 100644
--- a/libkvm/kvm-common.h
+++ b/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/qemu-kvm.c b/qemu/qemu-kvm.c
index 4056453..98e92b9 100644
--- a/qemu/qemu-kvm.c
+++ b/qemu/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)
 {

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
kvm-commits mailing list
kvm-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-commits

Reply via email to