[PATCH] kvm: x86: Increase MAX_VCPUS to 710

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Support for 710 VCPUs has been tested by Red Hat since RHEL-8.4.
Increase KVM_MAX_VCPUS and KVM_SOFT_MAX_VCPUS to 710.

For reference, visible effects of changing KVM_MAX_VCPUS are:
- KVM_CAP_MAX_VCPUS and KVM_CAP_NR_VCPUS will now return 710 (of course)
- Default value for CPUID[HYPERV_CPUID_IMPLEMENT_LIMITS (00x40000005)].EAX
  will now be 710
- Bitmap stack variables that will grow:
  - At kvm_hv_flush_tlb()  kvm_hv_send_ipi():
    - Sparse VCPU bitmap (vp_bitmap) will be 96 bytes long
    - vcpu_bitmap will be 92 bytes long
  - vcpu_bitmap at bioapic_write_indirect() will be 92 bytes long
    once patch "KVM: x86: Fix stack-out-of-bounds memory access
    from ioapic_write_indirect()" is applied

Signed-off-by: Eduardo Habkost <ehabkost@xxxxxxxxxx>
---
 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 af6ce8d4c86a..f76fae42bf45 100644
--- a/arch/x86/include/asm/kvm_host.h
+++ b/arch/x86/include/asm/kvm_host.h
@@ -37,8 +37,8 @@
 
 #define __KVM_HAVE_ARCH_VCPU_DEBUGFS
 
-#define KVM_MAX_VCPUS 288
-#define KVM_SOFT_MAX_VCPUS 240
+#define KVM_MAX_VCPUS 710
+#define KVM_SOFT_MAX_VCPUS 710
 #define KVM_MAX_VCPU_ID 1023
 /* memory slots that are not exposed to userspace */
 #define KVM_PRIVATE_MEM_SLOTS 3
-- 
2.31.1




[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux