aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kvm/mmu.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86/kvm/mmu.c')
-rw-r--r--arch/x86/kvm/mmu.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c
index a5872b3c466d..dd4b95b3896b 100644
--- a/arch/x86/kvm/mmu.c
+++ b/arch/x86/kvm/mmu.c
@@ -626,6 +626,14 @@ static void rmap_write_protect(struct kvm *kvm, u64 gfn)
626 } 626 }
627 spte = rmap_next(kvm, rmapp, spte); 627 spte = rmap_next(kvm, rmapp, spte);
628 } 628 }
629 if (write_protected) {
630 struct page *page;
631
632 spte = rmap_next(kvm, rmapp, NULL);
633 page = pfn_to_page((*spte & PT64_BASE_ADDR_MASK) >> PAGE_SHIFT);
634 SetPageDirty(page);
635 }
636
629 /* check for huge page mappings */ 637 /* check for huge page mappings */
630 rmapp = gfn_to_rmap(kvm, gfn, 1); 638 rmapp = gfn_to_rmap(kvm, gfn, 1);
631 spte = rmap_next(kvm, rmapp, NULL); 639 spte = rmap_next(kvm, rmapp, NULL);