]> bbs.cooldavid.org Git - net-next-2.6.git/commit
KVM: MMU: fix page dirty tracking lost while sync page
authorXiao Guangrong <xiaoguangrong@cn.fujitsu.com>
Fri, 16 Jul 2010 03:25:17 +0000 (11:25 +0800)
committerAvi Kivity <avi@redhat.com>
Mon, 2 Aug 2010 03:40:58 +0000 (06:40 +0300)
commit9ed5520dd3c9cb79c25f95fce9c57b87637d0fb7
tree32a983f23b3aa4dba5dea64a57f1b96126afe92a
parentdaa3db693ce925a14b7e17ab6f306dc0e6a5342c
KVM: MMU: fix page dirty tracking lost while sync page

In sync-page path, if spte.writable is changed, it will lose page dirty
tracking, for example:

assume spte.writable = 0 in a unsync-page, when it's synced, it map spte
to writable(that is spte.writable = 1), later guest write spte.gfn, it means
spte.gfn is dirty, then guest changed this mapping to read-only, after it's
synced,  spte.writable = 0

So, when host release the spte, it detect spte.writable = 0 and not mark page
dirty

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