[PATCH v1 02/10] KVM: arm64: nv: Don't WARN on an invalid VTCR_EL2
From: Fuad Tabba
Date: Mon Sep 28 2026 - 11:36:58 EST
Before walking an L1 guest's stage-2 tables, KVM checks the starting
level in VTCR_EL2.SL0 and the IPA size from T0SZ against the granule
and PA size, and sets a stage-2 level 0 Translation fault when either
is invalid. The check also WARNs, so an L1 guest that programs an
invalid VTCR_EL2 triggers the WARN on every walk.
Drop the WARN.
Fixes: 61e30b9eef7ff ("KVM: arm64: nv: Implement nested Stage-2 page table walk logic")
Signed-off-by: Fuad Tabba <fuad.tabba@xxxxxxxxx>
---
arch/arm64/kvm/nested.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm64/kvm/nested.c b/arch/arm64/kvm/nested.c
index 3c4fc566eafc6..98c1f8c193319 100644
--- a/arch/arm64/kvm/nested.c
+++ b/arch/arm64/kvm/nested.c
@@ -279,7 +279,7 @@ static int walk_nested_s2_pgd(struct kvm_vcpu *vcpu, phys_addr_t ipa,
return -EFAULT;
ret = check_base_s2_limits(vcpu, wi, level, input_size, stride);
- if (WARN_ON(ret)) {
+ if (ret) {
out->esr = compute_fsc(0, ESR_ELx_FSC_FAULT);
return ret;
}
--
2.39.5