« Previous | Next » 

Revision fb541ca5

IDfb541ca59c8b55911821c9f794c3dbe5de9ba9d8

Added by Alex Williamson over 10 years ago

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: Alex Williamson <>
Reviewed-by: Thomas Huth <>
Signed-off-by: Paolo Bonzini <>

Files

  • added
  • modified
  • copied
  • renamed
  • deleted

View differences