mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 1/1] kvm: increase max vcpu count
@ 2014-05-15  9:50 Li, Zhen-Hua
  2014-05-15 10:18 ` Radim Krčmář
  0 siblings, 1 reply; 2+ messages in thread
From: Li, Zhen-Hua @ 2014-05-15  9:50 UTC (permalink / raw)
  To: Gleb Natapov, Paolo Bonzini, Thomas Gleixner, Ingo Molnar,
	H. Peter Anvin, x86, kvm, linux-kernel
  Cc: Li, Zhen-Hua

This patch is trying to increase the maximum supported vcpu number.

There has been big system supporting more than 256 logical CPUs, and vmware
can also support guest system with more than logical 256 CPUs. So kvm should 
also increase the maximum supported cpu number.

This patch only includes kernel kvm's part. The qemu support will be another 
thread.

Signed-off-by: Li, Zhen-Hua <zhen-hual@hp.com>
---
 arch/x86/include/asm/kvm_host.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/x86/include/asm/kvm_host.h b/arch/x86/include/asm/kvm_host.h
index 7de069af..92cc83c 100644
--- a/arch/x86/include/asm/kvm_host.h
+++ b/arch/x86/include/asm/kvm_host.h
@@ -31,8 +31,8 @@
 #include <asm/msr-index.h>
 #include <asm/asm.h>
 
-#define KVM_MAX_VCPUS 255
-#define KVM_SOFT_MAX_VCPUS 160
+#define KVM_MAX_VCPUS 4096
+#define KVM_SOFT_MAX_VCPUS 4096
 #define KVM_USER_MEM_SLOTS 125
 /* memory slots that are not exposed to userspace */
 #define KVM_PRIVATE_MEM_SLOTS 3
-- 
2.0.0-rc0


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

* Re: [PATCH 1/1] kvm: increase max vcpu count
  2014-05-15  9:50 [PATCH 1/1] kvm: increase max vcpu count Li, Zhen-Hua
@ 2014-05-15 10:18 ` Radim Krčmář
  0 siblings, 0 replies; 2+ messages in thread
From: Radim Krčmář @ 2014-05-15 10:18 UTC (permalink / raw)
  To: Li, Zhen-Hua
  Cc: Gleb Natapov, Paolo Bonzini, Thomas Gleixner, Ingo Molnar,
	H. Peter Anvin, x86, kvm, linux-kernel

2014-05-15 17:50+0800, Li, Zhen-Hua:
> This patch is trying to increase the maximum supported vcpu number.
> 
> There has been big system supporting more than 256 logical CPUs, and vmware
> can also support guest system with more than logical 256 CPUs. So kvm should 
> also increase the maximum supported cpu number.

How did it work?
KVM lapic does not handle more more than 256 [1] at the moment, so
additional VCPUs had to wraparound ...

---
1: "struct kvm_apic_map" has "struct kvm_lapic *phys_map[256]" and we
   are using "& 0xff" when dealing with it, too.

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

end of thread, other threads:[~2014-05-15 10:18 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-05-15  9:50 [PATCH 1/1] kvm: increase max vcpu count Li, Zhen-Hua
2014-05-15 10:18 ` Radim Krčmář

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome