Skip to content

Commit 99a3393

Browse files
Zenghui Yu (Huawei)Marc Zyngier
authored andcommitted
KVM: arm64: nv: Report addrsz fault at level 0 with a bad VTTBR.BADDR
As per R_BFHQH, " When an Address size fault is generated, the reported fault code indicates one of the following: If the fault was generated due to the TTBR_ELx used in the translation having nonzero address bits above the OA size, then a fault at level 0. " Fix the reported Address size fault level as being 0 if the base address is wrongly programmed by L1. Fixes: 61e30b9 ("KVM: arm64: nv: Implement nested Stage-2 page table walk logic") Signed-off-by: Zenghui Yu (Huawei) <zenghui.yu@linux.dev> Link: https://patch.msgid.link/20260225173515.20490-3-zenghui.yu@linux.dev Signed-off-by: Marc Zyngier <maz@kernel.org>
1 parent 4c2264e commit 99a3393

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

arch/arm64/kvm/nested.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,8 @@ static int walk_nested_s2_pgd(struct kvm_vcpu *vcpu, phys_addr_t ipa,
280280
base_addr = wi->baddr & GENMASK_ULL(47, base_lower_bound);
281281

282282
if (check_output_size(wi, base_addr)) {
283-
out->esr = compute_fsc(level, ESR_ELx_FSC_ADDRSZ);
283+
/* R_BFHQH */
284+
out->esr = compute_fsc(0, ESR_ELx_FSC_ADDRSZ);
284285
return 1;
285286
}
286287

0 commit comments

Comments
 (0)