]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: MMU: Remove user access when allowing kernel access to gpte.w=0 page
authorAvi Kivity <avi@redhat.com>
Thu, 27 May 2010 11:35:58 +0000 (14:35 +0300)
committerAvi Kivity <avi@redhat.com>
Wed, 9 Jun 2010 15:48:37 +0000 (18:48 +0300)
commit322b8741437d15a7135adf3a9ad55f4cfaa50b5b
tree714358f2e6229e699740bc249b2327b10ba67854
parentf3a8c4d176852c2b213d7e1502297d4211a9e3b8
KVM: MMU: Remove user access when allowing kernel access to gpte.w=0 page

If cr0.wp=0, we have to allow the guest kernel access to a page with pte.w=0.
We do that by setting spte.w=1, since the host cr0.wp must remain set so the
host can write protect pages.  Once we allow write access, we must remove
user access otherwise we mistakenly allow the user to write the page.

Reviewed-by: Xiao Guangrong <xiaoguangrong@cn.fujitsu.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
arch/x86/kvm/mmu.c