From e38c4149ed85c027a8ee363d2db79cfe80f01dca Mon Sep 17 00:00:00 2001 From: Will Deacon Date: Thu, 15 Dec 2022 12:45:24 +0000 Subject: [PATCH] ANDROID: KVM: arm64: Don't filter out KVM_FUNC_MMIO_GUARD_MAP hypercalls If a KVM_FUNC_MMIO_GUARD_MAP hypercall from a protected guest fails at EL2 due to running out of page-table memory, the call is forwarded to the host so that additional memory can be donated using the vCPU's memcache. Unfortunately, the host filters out these calls the hypervisor will replay the guest's HVC instruction forever, making no progress because it will fail each time. Avoid filtering out KVM_FUNC_MMIO_GUARD_MAP, in the same way as we handle the SHARE and UNSHARE hypercalls. Bug: 262700476 Cc: Keir Fraser Signed-off-by: Will Deacon Change-Id: Idd14c6bc08a4232939676e3566b79cbc7c927a3a --- arch/arm64/kvm/hypercalls.c | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm64/kvm/hypercalls.c b/arch/arm64/kvm/hypercalls.c index fc64e8358928..b4712bcc697d 100644 --- a/arch/arm64/kvm/hypercalls.c +++ b/arch/arm64/kvm/hypercalls.c @@ -85,6 +85,7 @@ static bool kvm_hvc_call_default_allowed(u32 func_id) case ARM_SMCCC_ARCH_FEATURES_FUNC_ID: case ARM_SMCCC_VENDOR_HYP_KVM_MEM_SHARE_FUNC_ID: case ARM_SMCCC_VENDOR_HYP_KVM_MEM_UNSHARE_FUNC_ID: + case ARM_SMCCC_VENDOR_HYP_KVM_MMIO_GUARD_MAP_FUNC_ID: return true; default: /* PSCI 0.2 and up is in the 0:0x1f range */