Skip to content

Commit 7e00013

Browse files
Szy0127sean-jc
authored andcommitted
KVM: SVM: Remove wbinvd in sev_vm_destroy()
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 <[email protected]> Signed-off-by: Zheyun Shen <[email protected]> Reviewed-by: Tom Lendacky <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Sean Christopherson <[email protected]>
1 parent 55aed8c commit 7e00013

File tree

1 file changed

+0
-6
lines changed

1 file changed

+0
-6
lines changed

arch/x86/kvm/svm/sev.c

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2820,12 +2820,6 @@ void sev_vm_destroy(struct kvm *kvm)
28202820
return;
28212821
}
28222822

2823-
/*
2824-
* Ensure that all guest tagged cache entries are flushed before
2825-
* releasing the pages back to the system for use. CLFLUSH will
2826-
* not do this, so issue a WBINVD.
2827-
*/
2828-
wbinvd_on_all_cpus();
28292823

28302824
/*
28312825
* if userspace was terminated before unregistering the memory regions

0 commit comments

Comments
 (0)