Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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: 61e30b9eef7f ("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>

authored by

Zenghui Yu (Huawei) and committed by
Marc Zyngier
99a33937 4c2264ec

+2 -1
+2 -1
arch/arm64/kvm/nested.c
··· 280 280 base_addr = wi->baddr & GENMASK_ULL(47, base_lower_bound); 281 281 282 282 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); 284 285 return 1; 285 286 } 286 287