fixup! Revert "KVM: arm64: Unshare the kvm from hyp only if vm has been created"
This reverts commit d5132d5fd6d8ae4bdaf35aa5a240d213e7bd2548.
It seems that this prevents us from *ever* unsharing the kvm struct,
leaving dangling SHARED_OWNED mappings in the Host EL2 which eventually
trip on a memory donation/share to a later guest VM, which then endlessly
faults and thus hangs.
diff --git a/arch/arm64/kvm/arm.c b/arch/arm64/kvm/arm.c
index ac663d9..33c23be 100644
--- a/arch/arm64/kvm/arm.c
+++ b/arch/arm64/kvm/arm.c
@@ -285,8 +285,7 @@
kfree(kvm->arch.sysreg_masks);
kvm_destroy_vcpus(kvm);
- if (is_protected_kvm_enabled() && pkvm_is_hyp_created(kvm))
- kvm_unshare_hyp(kvm, kvm + 1);
+ kvm_unshare_hyp(kvm, kvm + 1);
kvm_arm_teardown_hypercalls(kvm);
}