All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Allow kvm to use more than 4 VCPUs
@ 2008-02-21 21:38 Anthony Liguori
  2008-02-24 10:16 ` Avi Kivity
  0 siblings, 1 reply; 3+ messages in thread
From: Anthony Liguori @ 2008-02-21 21:38 UTC (permalink / raw)
  To: kvm-devel; +Cc: Anthony Liguori, Avi Kivity

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>

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 ffc59d5..1b7cac3 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/

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2008-02-24 11:02 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-02-21 21:38 [PATCH] Allow kvm to use more than 4 VCPUs Anthony Liguori
2008-02-24 10:16 ` Avi Kivity
2008-02-24 11:02   ` Alexey Eremenko

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.