KVM: introduce readonly memslot
authorXiao Guangrong <xiaoguangrong@linux.vnet.ibm.com>
Tue, 21 Aug 2012 03:02:51 +0000 (11:02 +0800)
committerAvi Kivity <avi@redhat.com>
Wed, 22 Aug 2012 12:09:03 +0000 (15:09 +0300)
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>

No differences found