Skip to content

Commit eb54fa1

Browse files
Zenghui Yu (Huawei)Marc Zyngier
authored andcommitted
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>
1 parent 99a3393 commit eb54fa1

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

arch/arm64/kvm/nested.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -296,8 +296,10 @@ static int walk_nested_s2_pgd(struct kvm_vcpu *vcpu, phys_addr_t ipa,
296296

297297
paddr = base_addr | index;
298298
ret = read_guest_s2_desc(vcpu, paddr, &desc, wi);
299-
if (ret < 0)
299+
if (ret < 0) {
300+
out->esr = ESR_ELx_FSC_SEA_TTW(level);
300301
return ret;
302+
}
301303

302304
new_desc = desc;
303305

0 commit comments

Comments
 (0)