All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] kvm: x86: Increase MAX_VCPUS to 710
@ 2021-08-31 20:45 Eduardo Habkost
  2021-09-01  8:02 ` Vitaly Kuznetsov
  0 siblings, 1 reply; 9+ messages in thread
From: Eduardo Habkost @ 2021-08-31 20:45 UTC (permalink / raw)
  To: kvm, Paolo Bonzini; +Cc: Vitaly Kuznetsov

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@redhat.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 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


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

end of thread, other threads:[~2021-09-03  8:13 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-31 20:45 [PATCH] kvm: x86: Increase MAX_VCPUS to 710 Eduardo Habkost
2021-09-01  8:02 ` Vitaly Kuznetsov
2021-09-01  9:13   ` Igor Mammedov
2021-09-01 10:13     ` Vitaly Kuznetsov
2021-09-01 13:36       ` Igor Mammedov
2021-09-01 14:42         ` Vitaly Kuznetsov
2021-09-01 15:25           ` Eduardo Habkost
2021-09-01 17:54             ` Eduardo Habkost
2021-09-03  8:13             ` Juergen Gross

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.