]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
KVM: MMU: fix direct sp's access corrupted
authorXiao Guangrong <xiaoguangrong@cn.fujitsu.com>
Fri, 17 Sep 2010 16:13:15 +0000 (13:13 -0300)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 27 Sep 2010 00:18:33 +0000 (17:18 -0700)
commit724b86b0bcd26cda145915e2991952f23e0775d2
treeecf13c32784f92dc3afe44cbfd9727a639fe0fdd
parentaaf270ed0cb87db6a037a682a3d2f860efb32f59
KVM: MMU: fix direct sp's access corrupted

commit 9e7b0e7fba45ca3c6357aeb7091ebc281f1de365 upstream.

If the mapping is writable but the dirty flag is not set, we will find
the read-only direct sp and setup the mapping, then if the write #PF
occur, we will mark this mapping writable in the read-only direct sp,
now, other real read-only mapping will happily write it without #PF.

It may hurt guest's COW

Fixed by re-install the mapping when write #PF occur.

Signed-off-by: Xiao Guangrong <xiaoguangrong@cn.fujitsu.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
arch/x86/kvm/paging_tmpl.h