ANDROID: KVM: arm64: Disable relinquish for p-guest huge-mappings
Memory relinquish with huge stage-2 mappings is currently utterly borken as we can't page-fault a half reclaimed huge mapping. Prevent it until it is fixed. Bug: 419548963 Bug: 357781595 Bug: 278011447 Change-Id: I7256042ed8392997dc488199c494cb9984270e24 Signed-off-by: Vincent Donnefort <vdonnefort@google.com>
This commit is contained in:
@@ -410,6 +410,10 @@ int __pkvm_guest_relinquish_to_host(struct pkvm_hyp_vcpu *vcpu,
|
||||
if (ret || !kvm_pte_valid(pte))
|
||||
goto end;
|
||||
|
||||
/* We don't support splitting non-leaf mappings */
|
||||
if (level != KVM_PGTABLE_LAST_LEVEL)
|
||||
goto end;
|
||||
|
||||
state = guest_get_page_state(pte, ipa);
|
||||
if (state != PKVM_PAGE_OWNED) {
|
||||
ret = -EPERM;
|
||||
|
||||
Reference in New Issue
Block a user