aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorAvi Kivity <avi@qumranet.com>2007-01-05 19:36:59 -0500
committerLinus Torvalds <torvalds@woody.osdl.org>2007-01-06 02:55:28 -0500
commit760db773fbd0ad2ece89393218c4a4213b5bae6a (patch)
tree8c644a962566335e2f21ffec2b8e0154b138dc17 /drivers
parent4db9c47c052b89d89f43d12879690c1b3283b887 (diff)
[PATCH] KVM: MMU: Add missing dirty bit
If we emulate a write, we fail to set the dirty bit on the guest pte, leading the guest to believe the page is clean, and thus lose data. Bad. Fix by setting the guest pte dirty bit under such conditions. Signed-off-by: Avi Kivity <avi@qumranet.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/kvm/paging_tmpl.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/kvm/paging_tmpl.h b/drivers/kvm/paging_tmpl.h
index c894b51ba3f8..2dbf4307ed9e 100644
--- a/drivers/kvm/paging_tmpl.h
+++ b/drivers/kvm/paging_tmpl.h
@@ -317,6 +317,7 @@ static int FNAME(fix_write_pf)(struct kvm_vcpu *vcpu,
317 } else if (kvm_mmu_lookup_page(vcpu, gfn)) { 317 } else if (kvm_mmu_lookup_page(vcpu, gfn)) {
318 pgprintk("%s: found shadow page for %lx, marking ro\n", 318 pgprintk("%s: found shadow page for %lx, marking ro\n",
319 __FUNCTION__, gfn); 319 __FUNCTION__, gfn);
320 *guest_ent |= PT_DIRTY_MASK;
320 *write_pt = 1; 321 *write_pt = 1;
321 return 0; 322 return 0;
322 } 323 }