diff options
author | Christoffer Dall <christoffer.dall@linaro.org> | 2014-08-26 08:00:37 -0400 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2014-08-29 07:47:04 -0400 |
commit | 0f8a4de3e088797576ac76200b634b802e5c7781 (patch) | |
tree | fdadf9b707953e463d3d91c45109fc83179eef39 /virt/kvm/kvm_main.c | |
parent | dc77d344b41f3ffdd3b02317597e717b0b799f46 (diff) |
KVM: Unconditionally export KVM_CAP_READONLY_MEM
The idea between capabilities and the KVM_CHECK_EXTENSION ioctl is that
userspace can, at run-time, determine if a feature is supported or not.
This allows KVM to being supporting a new feature with a new kernel
version without any need to update user space. Unfortunately, since the
definition of KVM_CAP_READONLY_MEM was guarded by #ifdef
__KVM_HAVE_READONLY_MEM, such discovery still required a user space
update.
Therefore, unconditionally export KVM_CAP_READONLY_MEM and change the
in-kernel conditional to rely on __KVM_HAVE_READONLY_MEM.
Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'virt/kvm/kvm_main.c')
-rw-r--r-- | virt/kvm/kvm_main.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c index 5a0817ee996e..1d03967def40 100644 --- a/virt/kvm/kvm_main.c +++ b/virt/kvm/kvm_main.c | |||
@@ -708,7 +708,7 @@ static int check_memory_region_flags(struct kvm_userspace_memory_region *mem) | |||
708 | { | 708 | { |
709 | u32 valid_flags = KVM_MEM_LOG_DIRTY_PAGES; | 709 | u32 valid_flags = KVM_MEM_LOG_DIRTY_PAGES; |
710 | 710 | ||
711 | #ifdef KVM_CAP_READONLY_MEM | 711 | #ifdef __KVM_HAVE_READONLY_MEM |
712 | valid_flags |= KVM_MEM_READONLY; | 712 | valid_flags |= KVM_MEM_READONLY; |
713 | #endif | 713 | #endif |
714 | 714 | ||