aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/kvm/kvm_main.c
diff options
context:
space:
mode:
authorUri Lublin <uril@qumranet.com>2007-10-30 04:42:09 -0400
committerAvi Kivity <avi@qumranet.com>2008-01-30 10:52:59 -0500
commit3b6fff198c2ae3ca87ee8c9103d52ac9e8f40dd5 (patch)
treee055c45fe6844d26539293708815c69c0268ef2d /drivers/kvm/kvm_main.c
parent9f1ef3f8f5f8ade2561d969181b152c225b82a3e (diff)
KVM: Make mark_page_dirty() work for aliased pages too.
Recommended by Izik Eidus. Signed-off-by: Uri Lublin <uril@qumranet.com> Signed-off-by: Avi Kivity <avi@qumranet.com>
Diffstat (limited to 'drivers/kvm/kvm_main.c')
-rw-r--r--drivers/kvm/kvm_main.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/kvm/kvm_main.c b/drivers/kvm/kvm_main.c
index 2025cdfb4593..cac66d505f57 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)
796} 796}
797EXPORT_SYMBOL_GPL(kvm_clear_guest); 797EXPORT_SYMBOL_GPL(kvm_clear_guest);
798 798
799/* WARNING: Does not work on aliased pages. */
800void mark_page_dirty(struct kvm *kvm, gfn_t gfn) 799void mark_page_dirty(struct kvm *kvm, gfn_t gfn)
801{ 800{
802 struct kvm_memory_slot *memslot; 801 struct kvm_memory_slot *memslot;
803 802
803 gfn = unalias_gfn(kvm, gfn);
804 memslot = __gfn_to_memslot(kvm, gfn); 804 memslot = __gfn_to_memslot(kvm, gfn);
805 if (memslot && memslot->dirty_bitmap) { 805 if (memslot && memslot->dirty_bitmap) {
806 unsigned long rel_gfn = gfn - memslot->base_gfn; 806 unsigned long rel_gfn = gfn - memslot->base_gfn;