[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1640f2af-8c1f-2a9f-9bd0-9a581576f329@amd.com>
Date: Thu, 6 Feb 2025 16:04:42 -0600
From: Tom Lendacky <thomas.lendacky@....com>
To: Zheyun Shen <szy0127@...u.edu.cn>, seanjc@...gle.com,
pbonzini@...hat.com, tglx@...utronix.de, kevinloughlin@...gle.com,
mingo@...hat.com, bp@...en8.de
Cc: kvm@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v7 2/3] KVM: SVM: Remove wbinvd in sev_vm_destroy()
On 1/27/25 19:53, Zheyun Shen wrote:
> Before sev_vm_destroy() is called, kvm_arch_guest_memory_reclaimed()
> has been called for SEV and SEV-ES and kvm_arch_gmem_invalidate()
> has been called for SEV-SNP. These functions have already handled
> flushing the memory. Therefore, this wbinvd_on_all_cpus() can
> simply be dropped.
>
> Suggested-by: Sean Christopherson <seanjc@...gle.com>
> Signed-off-by: Zheyun Shen <szy0127@...u.edu.cn>
Reviewed-by: Tom Lendacky <thomas.lendacky@....com>
> ---
> arch/x86/kvm/svm/sev.c | 6 ------
> 1 file changed, 6 deletions(-)
>
> diff --git a/arch/x86/kvm/svm/sev.c b/arch/x86/kvm/svm/sev.c
> index 943bd074a..1ce67de9d 100644
> --- a/arch/x86/kvm/svm/sev.c
> +++ b/arch/x86/kvm/svm/sev.c
> @@ -2899,12 +2899,6 @@ void sev_vm_destroy(struct kvm *kvm)
> return;
> }
>
> - /*
> - * Ensure that all guest tagged cache entries are flushed before
> - * releasing the pages back to the system for use. CLFLUSH will
> - * not do this, so issue a WBINVD.
> - */
> - wbinvd_on_all_cpus();
>
> /*
> * if userspace was terminated before unregistering the memory regions
Powered by blists - more mailing lists