KVM: mmu: allow page tables to be in read-only slots
authorPaolo Bonzini <pbonzini@redhat.com>
Mon, 9 Sep 2013 11:52:33 +0000 (13:52 +0200)
committerGleb Natapov <gleb@redhat.com>
Tue, 17 Sep 2013 09:52:31 +0000 (12:52 +0300)
Page tables in a read-only memory slot will currently cause a triple
fault because the page walker uses gfn_to_hva and it fails on such a slot.

OVMF uses such a page table; however, real hardware seems to be fine with
that as long as the accessed/dirty bits are set.  Save whether the slot
is readonly, and later check it when updating the accessed and dirty bits.

Reviewed-by: Xiao Guangrong <xiaoguangrong@linux.vnet.ibm.com>
Reviewed-by: Gleb Natapov <gleb@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>

No differences found