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 Change-Id: I7256042ed8392997dc488199c494cb9984270e24 Signed-off-by: Vincent Donnefort <vdonnefort@google.com>
This commit is contained in:
@@ -387,6 +387,10 @@ static int relinquish_walker(const struct kvm_pgtable_visit_ctx *ctx,
|
||||
if (!kvm_pte_valid(pte))
|
||||
return 0;
|
||||
|
||||
/* We don't support splitting non-leaf mappings */
|
||||
if (ctx->level != (KVM_PGTABLE_MAX_LEVELS - 1))
|
||||
return 0;
|
||||
|
||||
state = pkvm_getstate(kvm_pgtable_stage2_pte_prot(pte));
|
||||
if (state != data->expected_state)
|
||||
return -EPERM;
|
||||
|
Reference in New Issue
Block a user