Re: [PATCH 8/9] KVM: x86: pass kvm_mmu_page to gfn_to_rmap

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>
> ---
> 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 kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux