Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

[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>

authored by

Avi Kivity and committed by
Linus Torvalds
760db773 4db9c47c

+1
+1
drivers/kvm/paging_tmpl.h
··· 317 317 } else if (kvm_mmu_lookup_page(vcpu, gfn)) { 318 318 pgprintk("%s: found shadow page for %lx, marking ro\n", 319 319 __FUNCTION__, gfn); 320 + *guest_ent |= PT_DIRTY_MASK; 320 321 *write_pt = 1; 321 322 return 0; 322 323 }