lkml.org 
[lkml]   [2021]   [Mar]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 13/13] KVM: x86/mmu: Tear down roots in fast invalidation thread
On Wed, Mar 31, 2021, Ben Gardon wrote:
> ---
> arch/x86/kvm/mmu/mmu.c | 6 ++++
> arch/x86/kvm/mmu/tdp_mmu.c | 74 +++++++++++++++++++++++++++++++++++++-
> arch/x86/kvm/mmu/tdp_mmu.h | 1 +
> 3 files changed, 80 insertions(+), 1 deletion(-)
>
> diff --git a/arch/x86/kvm/mmu/mmu.c b/arch/x86/kvm/mmu/mmu.c
> index 49b7097fb55b..22742619698d 100644
> --- a/arch/x86/kvm/mmu/mmu.c
> +++ b/arch/x86/kvm/mmu/mmu.c
> @@ -5455,6 +5455,12 @@ static void kvm_mmu_zap_all_fast(struct kvm *kvm)
> kvm_zap_obsolete_pages(kvm);
>
> write_unlock(&kvm->mmu_lock);
> +
> + if (is_tdp_mmu_enabled(kvm)) {
> + read_lock(&kvm->mmu_lock);
> + kvm_tdp_mmu_zap_all_fast(kvm);

Purely because it exists first, I think we should follow the legacy MMU's
terminology, i.e. kvm_tdp_mmu_zap_obsolete_pages().

> + read_unlock(&kvm->mmu_lock);
> + }
> }

\
 
 \ /
  Last update: 2021-04-01 00:31    [W:0.194 / U:0.292 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site