diff options
author | Xiao Guangrong <xiaoguangrong@linux.vnet.ibm.com> | 2012-08-21 05:02:51 +0200 |
---|---|---|
committer | Avi Kivity <avi@redhat.com> | 2012-08-22 14:09:03 +0200 |
commit | 4d8b81abc47b83a1939e59df2fdb0e98dfe0eedd (patch) | |
tree | 47ea77cb4f77a2884a0478ecf84f62e32e5661ee /arch/x86/include | |
parent | KVM: introduce KVM_HVA_ERR_RO_BAD (diff) | |
download | linux-4d8b81abc47b83a1939e59df2fdb0e98dfe0eedd.tar.xz linux-4d8b81abc47b83a1939e59df2fdb0e98dfe0eedd.zip |
KVM: introduce readonly memslot
In current code, if we map a readonly memory space from host to guest
and the page is not currently mapped in the host, we will get a fault
pfn and async is not allowed, then the vm will crash
We introduce readonly memory region to map ROM/ROMD to the guest, read access
is happy for readonly memslot, write access on readonly memslot will cause
KVM_EXIT_MMIO exit
Signed-off-by: Xiao Guangrong <xiaoguangrong@linux.vnet.ibm.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'arch/x86/include')
-rw-r--r-- | arch/x86/include/asm/kvm.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/x86/include/asm/kvm.h b/arch/x86/include/asm/kvm.h index 246617efd67f..521bf252e34b 100644 --- a/arch/x86/include/asm/kvm.h +++ b/arch/x86/include/asm/kvm.h @@ -25,6 +25,7 @@ #define __KVM_HAVE_DEBUGREGS #define __KVM_HAVE_XSAVE #define __KVM_HAVE_XCRS +#define __KVM_HAVE_READONLY_MEM /* Architectural interrupt line count. */ #define KVM_NR_INTERRUPTS 256 |