Messages in this thread | | | Date | Wed, 20 May 2015 22:09:02 +0200 | From | Radim Krčmář <> | Subject | Re: [PATCH 8/9] KVM: x86: pass kvm_mmu_page to gfn_to_rmap |
| |
2015-05-19 19:25+0200, Paolo Bonzini: > This is always available, and later we could also use the role to look > up the right memslots array. > > Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> > --- > diff --git a/arch/x86/kvm/mmu_audit.c b/arch/x86/kvm/mmu_audit.c > @@ -192,10 +192,11 @@ static void audit_write_protection(struct kvm *kvm, struct kvm_mmu_page *sp) > u64 *sptep; > struct rmap_iterator iter; > > - if (sp->role.direct || sp->unsync || sp->role.invalid) > + if (sp->role.direct || sp->unsync || sp->role.invalid || > + sp->role.level != PT_PAGE_TABLE_LEVEL) > return; > > - rmapp = gfn_to_rmap(kvm, sp->gfn, PT_PAGE_TABLE_LEVEL);
Why were we forcing PT_PAGE_TABLE_LEVEL for all levels?
Thanks.
> + rmapp = gfn_to_rmap(kvm, sp->gfn, sp); > > for_each_rmap_spte(rmapp, &iter, sptep) > if (is_writable_pte(*sptep))
| |