Re: [PATCH 3/7] KVM: MMU: Add drop_spte_if_large() helper

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

 




Avi Kivity wrote:
> To clarify spte fetching code, move large spte handling into a helper.
> 
> Signed-off-by: Avi Kivity <avi@xxxxxxxxxx>
> ---
>  arch/x86/kvm/mmu.c         |    8 ++++++++
>  arch/x86/kvm/paging_tmpl.h |    5 +----
>  2 files changed, 9 insertions(+), 4 deletions(-)
> 
> diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c
> index 75cfb79..c02cbe1 100644
> --- a/arch/x86/kvm/mmu.c
> +++ b/arch/x86/kvm/mmu.c
> @@ -1492,6 +1492,14 @@ static void link_shadow_page(u64 *sptep, struct kvm_mmu_page *sp)
>  	__set_spte(sptep, spte);
>  }
>  
> +static void drop_spte_if_large(struct kvm_vcpu *vcpu, u64 *sptep)
> +{
> +	if (is_large_pte(*sptep)) {
> +		drop_spte(vcpu->kvm, sptep, shadow_trap_nonpresent_pte);
> +		kvm_flush_remote_tlbs(vcpu->kvm);
> +	}
> +}
> +

Maybe drop_large_spte() is better?
--
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