summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZenghui Yu (Huawei) <zenghui.yu@linux.dev>2026-02-25 20:35:15 +0300
committerMarc Zyngier <maz@kernel.org>2026-03-05 18:46:48 +0300
commiteb54fa1025f8b520f0e83a807d76e35e4587c5ff (patch)
tree3e52152bbe9383cdbbead06404eab38a1293d6ba
parent99a339377f3c1bdf6edd5614d36893ab1806f9e6 (diff)
downloadlinux-eb54fa1025f8b520f0e83a807d76e35e4587c5ff.tar.xz
KVM: arm64: nv: Inject a SEA if failed to read the descriptor
Failure to read the descriptor (because it is outside of a memslot) should result in a SEA being injected in the guest. Suggested-by: Marc Zyngier <maz@kernel.org> Link: https://lore.kernel.org/r/86ms1m9lp3.wl-maz@kernel.org Signed-off-by: Zenghui Yu (Huawei) <zenghui.yu@linux.dev> Link: https://patch.msgid.link/20260225173515.20490-4-zenghui.yu@linux.dev Signed-off-by: Marc Zyngier <maz@kernel.org>
-rw-r--r--arch/arm64/kvm/nested.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/arch/arm64/kvm/nested.c b/arch/arm64/kvm/nested.c
index 91e4f3cb580a..2c43097248b2 100644
--- a/arch/arm64/kvm/nested.c
+++ b/arch/arm64/kvm/nested.c
@@ -296,8 +296,10 @@ static int walk_nested_s2_pgd(struct kvm_vcpu *vcpu, phys_addr_t ipa,
paddr = base_addr | index;
ret = read_guest_s2_desc(vcpu, paddr, &desc, wi);
- if (ret < 0)
+ if (ret < 0) {
+ out->esr = ESR_ELx_FSC_SEA_TTW(level);
return ret;
+ }
new_desc = desc;