lkml.org 
[lkml]   [2015]   [May]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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))


\
 
 \ /
  Last update: 2015-05-20 22:41    [W:0.113 / U:0.132 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site