]> err.no Git - linux-2.6/commitdiff
KVM: Make mark_page_dirty() work for aliased pages too.
authorUri Lublin <uril@qumranet.com>
Tue, 30 Oct 2007 08:42:09 +0000 (10:42 +0200)
committerAvi Kivity <avi@qumranet.com>
Wed, 30 Jan 2008 15:52:59 +0000 (17:52 +0200)
Recommended by Izik Eidus.

Signed-off-by: Uri Lublin <uril@qumranet.com>
Signed-off-by: Avi Kivity <avi@qumranet.com>
drivers/kvm/kvm_main.c

index 2025cdfb45934f05302da89b96af660ddafb099b..cac66d505f5768ef023d0d52c0034505d9a94fcf 100644 (file)
@@ -796,11 +796,11 @@ int kvm_clear_guest(struct kvm *kvm, gpa_t gpa, unsigned long len)
 }
 EXPORT_SYMBOL_GPL(kvm_clear_guest);
 
-/* WARNING: Does not work on aliased pages. */
 void mark_page_dirty(struct kvm *kvm, gfn_t gfn)
 {
        struct kvm_memory_slot *memslot;
 
+       gfn = unalias_gfn(kvm, gfn);
        memslot = __gfn_to_memslot(kvm, gfn);
        if (memslot && memslot->dirty_bitmap) {
                unsigned long rel_gfn = gfn - memslot->base_gfn;