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>
Showing
- Documentation/virtual/kvm/api.txt 7 additions, 3 deletionsDocumentation/virtual/kvm/api.txt
- arch/x86/include/asm/kvm.h 1 addition, 0 deletionsarch/x86/include/asm/kvm.h
- arch/x86/kvm/mmu.c 9 additions, 0 deletionsarch/x86/kvm/mmu.c
- arch/x86/kvm/x86.c 1 addition, 0 deletionsarch/x86/kvm/x86.c
- include/linux/kvm.h 5 additions, 1 deletioninclude/linux/kvm.h
- include/linux/kvm_host.h 1 addition, 6 deletionsinclude/linux/kvm_host.h
- virt/kvm/kvm_main.c 78 additions, 18 deletionsvirt/kvm/kvm_main.c
Loading
Please register or sign in to comment