diff options
author | James Hogan <james.hogan@imgtec.com> | 2015-05-08 12:11:49 -0400 |
---|---|---|
committer | James Hogan <james.hogan@imgtec.com> | 2017-02-03 10:21:29 -0500 |
commit | 230c57244c2c4d945dba7f9d15845bffe4135b58 (patch) | |
tree | 02b477450a560c2b8e9515c35fd49634fbf87e0b | |
parent | 411740f5422a960c30a4285343d821b62daec34b (diff) |
KVM: MIPS: Claim KVM_CAP_READONLY_MEM support
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
-rw-r--r-- | arch/mips/include/uapi/asm/kvm.h | 2 | ||||
-rw-r--r-- | arch/mips/kvm/mips.c | 1 |
2 files changed, 3 insertions, 0 deletions
diff --git a/arch/mips/include/uapi/asm/kvm.h b/arch/mips/include/uapi/asm/kvm.h index 6985eb59b085..a8a0199bf760 100644 --- a/arch/mips/include/uapi/asm/kvm.h +++ b/arch/mips/include/uapi/asm/kvm.h | |||
@@ -19,6 +19,8 @@ | |||
19 | * Some parts derived from the x86 version of this file. | 19 | * Some parts derived from the x86 version of this file. |
20 | */ | 20 | */ |
21 | 21 | ||
22 | #define __KVM_HAVE_READONLY_MEM | ||
23 | |||
22 | /* | 24 | /* |
23 | * for KVM_GET_REGS and KVM_SET_REGS | 25 | * for KVM_GET_REGS and KVM_SET_REGS |
24 | * | 26 | * |
diff --git a/arch/mips/kvm/mips.c b/arch/mips/kvm/mips.c index 9932f53a1e5c..591426cda15e 100644 --- a/arch/mips/kvm/mips.c +++ b/arch/mips/kvm/mips.c | |||
@@ -1217,6 +1217,7 @@ int kvm_vm_ioctl_check_extension(struct kvm *kvm, long ext) | |||
1217 | switch (ext) { | 1217 | switch (ext) { |
1218 | case KVM_CAP_ONE_REG: | 1218 | case KVM_CAP_ONE_REG: |
1219 | case KVM_CAP_ENABLE_CAP: | 1219 | case KVM_CAP_ENABLE_CAP: |
1220 | case KVM_CAP_READONLY_MEM: | ||
1220 | case KVM_CAP_SYNC_MMU: | 1221 | case KVM_CAP_SYNC_MMU: |
1221 | r = 1; | 1222 | r = 1; |
1222 | break; | 1223 | break; |