KVM: Unconditionally export KVM_CAP_READONLY_MEM
authorChristoffer Dall <christoffer.dall@linaro.org>
Tue, 26 Aug 2014 12:00:37 +0000 (14:00 +0200)
committerChristoffer Dall <christoffer.dall@linaro.org>
Thu, 2 Oct 2014 15:19:14 +0000 (17:19 +0200)
commitd3b49fbe5764b06372df1dea9c9bea5b8373f49c
treef18f709c5f4a7bc32b51b586267fdb31991d4255
parent8ec715912ec282c0c560407fe72ae80b14c8d320
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>
(cherry picked from commit 0f8a4de3e088797576ac76200b634b802e5c7781)
Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org>
include/uapi/linux/kvm.h
virt/kvm/kvm_main.c