KVM: MIPS: Claim KVM_CAP_READONLY_MEM support
authorJames Hogan <james.hogan@imgtec.com>
Fri, 8 May 2015 16:11:49 +0000 (17:11 +0100)
committerJames Hogan <james.hogan@imgtec.com>
Fri, 3 Feb 2017 15:21:29 +0000 (15:21 +0000)
Now that load/store faults due to read only memory regions are treated
as MMIO accesses it is safe to claim support for read only memory
regions (KVM_CAP_READONLY_MEM).

Signed-off-by: James Hogan <james.hogan@imgtec.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc: "Radim Krčmář" <rkrcmar@redhat.com>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: linux-mips@linux-mips.org
Cc: kvm@vger.kernel.org
arch/mips/include/uapi/asm/kvm.h
arch/mips/kvm/mips.c

index 6985eb59b08534581f7b4316655367182cb6f64f..a8a0199bf7601aeaf01538c8de07b0bae76ca151 100644 (file)
@@ -19,6 +19,8 @@
  * Some parts derived from the x86 version of this file.
  */
 
+#define __KVM_HAVE_READONLY_MEM
+
 /*
  * for KVM_GET_REGS and KVM_SET_REGS
  *
index 9932f53a1e5c52c5f4a5084884e5023c79175ac3..591426cda15ecc71d5f56d97739a6f2218612166 100644 (file)
@@ -1217,6 +1217,7 @@ int kvm_vm_ioctl_check_extension(struct kvm *kvm, long ext)
        switch (ext) {
        case KVM_CAP_ONE_REG:
        case KVM_CAP_ENABLE_CAP:
+       case KVM_CAP_READONLY_MEM:
        case KVM_CAP_SYNC_MMU:
                r = 1;
                break;