From: Uri Lublin Date: Tue, 30 Oct 2007 08:42:09 +0000 (+0200) Subject: KVM: Make mark_page_dirty() work for aliased pages too. X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=3b6fff198c2ae3ca87ee8c9103d52ac9e8f40dd5;p=mv-sheeva.git KVM: Make mark_page_dirty() work for aliased pages too. Recommended by Izik Eidus. Signed-off-by: Uri Lublin Signed-off-by: Avi Kivity --- diff --git a/drivers/kvm/kvm_main.c b/drivers/kvm/kvm_main.c index 2025cdfb459..cac66d505f5 100644 --- a/drivers/kvm/kvm_main.c +++ b/drivers/kvm/kvm_main.c @@ -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;