]> err.no Git - linux-2.6/commitdiff
KVM: Add API for determining the number of supported memory slots
authorAvi Kivity <avi@qumranet.com>
Wed, 20 Feb 2008 09:59:20 +0000 (11:59 +0200)
committerAvi Kivity <avi@qumranet.com>
Sun, 27 Apr 2008 08:53:23 +0000 (11:53 +0300)
Signed-off-by: Avi Kivity <avi@qumranet.com>
arch/x86/kvm/x86.c
include/linux/kvm.h

index 955d2eeac964db498170f3a780343d3a29240999..b7c32f63671dabe5254a7cae1ef89fac1a6176be 100644 (file)
@@ -814,6 +814,9 @@ int kvm_dev_ioctl_check_extension(long ext)
        case KVM_CAP_NR_VCPUS:
                r = KVM_MAX_VCPUS;
                break;
+       case KVM_CAP_NR_MEMSLOTS:
+               r = KVM_MEMORY_SLOTS;
+               break;
        default:
                r = 0;
                break;
index deb9c38f98e73ee5d2884de12b13272601096b0e..e92e70324ea169ff8696cfda33bd1d7c166c1157 100644 (file)
@@ -235,6 +235,7 @@ struct kvm_vapic_addr {
 #define KVM_CAP_EXT_CPUID 7
 #define KVM_CAP_CLOCKSOURCE 8
 #define KVM_CAP_NR_VCPUS 9       /* returns max vcpus per vm */
+#define KVM_CAP_NR_MEMSLOTS 10   /* returns max memory slots per vm */
 
 /*
  * ioctls for VM fds