RFC KVM: x86: Drastically raise KVM_USER_MEM_SLOTS limit
Get series with b4
b4 am [email protected]Versions newest first
- v1 RFC Latest4 patches 14 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/4 | KVM: x86: Drop redundant KVM_MEM_SLOTS_NUM definitionarch/ | +0 | 1 reply | |
| 2/4 | KVM: mips: Drop KVM_PRIVATE_MEM_SLOTS definitionarch/ | +0 | 0 replies | |
| 3/4 | KVM: Define KVM_USER_MEM_SLOTS in arch-neutral include/linux/kvm_host.hinclude/ | +4 | 6 replies | |
| 4/4 | KVM: x86: Stop limiting KVM_USER_MEM_SLOTSarch/ | +1 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH RFC 0/4] KVM: x86: Drastically raise KVM_USER_MEM_SLOTS limit
TL;DR: any particular reason why KVM_USER_MEM_SLOTS is so low?
Longer version:
Current KVM_USER_MEM_SLOTS limit (509) can be a limiting factor for some configurations. In particular, when QEMU tries to start a Windows guest with Hyper-V SynIC enabled and e.g. 256 vCPUs the limit is hit as SynIC requires two pages per vCPU and the guest is free to pick any GFN for each of them, this fragments memslots as QEMU wants to have a separate memslot for each of these pages (which are supposed to act as 'overlay' pages).
Memory slots are allocated dynamically in KVM when added so the only real limitation is 'id_to_index' array which is 'short'. We don't have any KVM_MEM_SLOTS_NUM/KVM_USER_MEM_SLOTS-sized statically defined arrays.
We could've just raised the limit to e.g. '1021' (we have 3 private memslots on x86) and this should be enough for now as KVM_MAX_VCPUS is '288' but AFAIK there are plans to raise this limit as well.
Vitaly Kuznetsov (4):
KVM: x86: Drop redundant KVM_MEM_SLOTS_NUM definition
KVM: mips: Drop KVM_PRIVATE_MEM_SLOTS definition
KVM: Define KVM_USER_MEM_SLOTS in arch-neutral
include/linux/kvm_host.h
KVM: x86: Stop limiting KVM_USER_MEM_SLOTS
arch/mips/include/asm/kvm_host.h | 2 -- arch/x86/include/asm/kvm_host.h | 3 +-- include/linux/kvm_host.h | 4 ++++ 3 files changed, 5 insertions(+), 4 deletions(-)
Signature · 1 line
2.29.2