ANDROID: KVM: arm64: pkvm: Allow the shadows to be destroyed on teardown

There is no difference between protected and non-protected guests
when it comes to shadow structures, and we want these shadow
structures to have the same life cycle.

Signed-off-by: Marc Zyngier <maz@kernel.org>
Bug: 209580772
Change-Id: I7e9bf366aae6bd0542d0038d24e2350a9dd23cd0
Signed-off-by: Will Deacon <willdeacon@google.com>
This commit is contained in:
Marc Zyngier
2022-01-05 18:50:17 +00:00
committed by Will Deacon
parent 1fef38359c
commit 88c46ab100

View File

@@ -197,9 +197,6 @@ static void kvm_shadow_destroy(struct kvm *kvm)
struct mm_struct *mm = current->mm;
struct list_head *ppages;
if (!kvm_vm_is_protected(kvm))
return;
if (kvm->arch.pkvm.shadow_handle)
WARN_ON(kvm_call_hyp_nvhe(__pkvm_teardown_shadow, kvm));