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.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c
index 1c784b96dac3..68575dc32ec7 100644
--- a/arch/x86/kvm/mmu.c
+++ b/arch/x86/kvm/mmu.c
@@ -3708,16 +3708,17 @@ static void audit_write_protection(struct kvm_vcpu *vcpu)
3708 struct kvm_memory_slot *slot; 3708 struct kvm_memory_slot *slot;
3709 unsigned long *rmapp; 3709 unsigned long *rmapp;
3710 u64 *spte; 3710 u64 *spte;
3711 gfn_t gfn;
3712 3711
3713 list_for_each_entry(sp, &vcpu->kvm->arch.active_mmu_pages, link) { 3712 list_for_each_entry(sp, &vcpu->kvm->arch.active_mmu_pages, link) {
3714 if (sp->role.direct) 3713 if (sp->role.direct)
3715 continue; 3714 continue;
3716 if (sp->unsync) 3715 if (sp->unsync)
3717 continue; 3716 continue;
3717 if (sp->role.invalid)
3718 continue;
3718 3719
3719 slot = gfn_to_memslot(vcpu->kvm, sp->gfn); 3720 slot = gfn_to_memslot(vcpu->kvm, sp->gfn);
3720 rmapp = &slot->rmap[gfn - slot->base_gfn]; 3721 rmapp = &slot->rmap[sp->gfn - slot->base_gfn];
3721 3722
3722 spte = rmap_next(vcpu->kvm, rmapp, NULL); 3723 spte = rmap_next(vcpu->kvm, rmapp, NULL);
3723 while (spte) { 3724 while (spte) {