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 <pbonz...@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))
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to