Skip to content

Commit

Permalink
KVM: Add API for determining the number of supported memory slots
Browse files Browse the repository at this point in the history
Signed-off-by: Avi Kivity <avi@qumranet.com>
  • Loading branch information
Avi Kivity committed Apr 27, 2008
1 parent edbe6c3 commit a988b91
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions arch/x86/kvm/x86.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
1 change: 1 addition & 0 deletions include/linux/kvm.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit a988b91

Please sign in to comment.