kvm: Query KVM for available memory slots
KVM reports the number of available memory slots (KVM_CAP_NR_MEMSLOTS) using the extension interface. Both x86 and s390 implement this, ARM and powerpc do not yet enable it. Convert the static slots array to be dynamically allocated, supporting more slots when available. Default to 32 when KVM_CAP_NR_MEMSLOTS is not implemented. The motivation for this change is to support more assigned devices, where memory mapped PCI MMIO BARs typically take one slot each. Signed-off-by: NAlex Williamson <alex.williamson@redhat.com> Reviewed-by: NThomas Huth <thuth@linux.vnet.ibm.com> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
Showing
想要评论请 注册 或 登录