]> git.karo-electronics.de Git - linux-beck.git/commit
KVM: MMU: fix direct sp's access corrupted
authorXiao Guangrong <xiaoguangrong@cn.fujitsu.com>
Wed, 30 Jun 2010 08:03:28 +0000 (16:03 +0800)
committerAvi Kivity <avi@redhat.com>
Sun, 1 Aug 2010 07:47:25 +0000 (10:47 +0300)
commit9e7b0e7fba45ca3c6357aeb7091ebc281f1de365
treee92144ed8d954cab432c6ccccacdc3aa2d4c645f
parent5fd5387c89ec99ff6cb82d2477ffeb7211b781c2
KVM: MMU: fix direct sp's access corrupted

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>
arch/x86/kvm/paging_tmpl.h