On 12/4/25 14:35, Alex Bennée wrote:
PC alignment faults have priority over instruction aborts and we have
code to deal with this in the translation front-ends. However during
tb_lookup we can see a potentially faulting probe which doesn't get a
MemOp set. If the page isn't available this results in
EC_INSNABORT (0x20) instead of EC_PCALIGNMENT (0x22).

As there is no easy way to set the appropriate MemOp in the
instruction fetch probe path lets just detect it in
arm_cpu_tlb_fill_align() ahead of the main alignment check. We also
teach arm_deliver_fault to deliver the right syndrome for
MMU_INST_FETCH alignment issues.

Fixes:https://gitlab.com/qemu-project/qemu/-/issues/3233
Tested-by: Jessica Clarke<[email protected]>
Signed-off-by: Alex Bennée<[email protected]>

---
v2
   - don't mess with MemOp for alignment check
   - expand arm_deliver_fault to pick up alignment issues
v3
   - update commit message
---
  target/arm/tcg/tlb_helper.c | 21 ++++++++++++++++-----
  1 file changed, 16 insertions(+), 5 deletions(-)

Reviewed-by: Richard Henderson <[email protected]>

r~

Reply via email to