On 15/5/26 15:12, Peter Maydell wrote:
The translate_for_debug method is supposed to return attributes
that include the debug flag being set. We forgot this when
implementing the method for Arm.
Fixes: abefca8e7f957 ("target/arm: Implement translate_for_debug")
Signed-off-by: Peter Maydell <[email protected]>
---
target/arm/ptw.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/target/arm/ptw.c b/target/arm/ptw.c
index 8706dd59dd..0693d2867e 100644
--- a/target/arm/ptw.c
+++ b/target/arm/ptw.c
@@ -3961,6 +3961,7 @@ static bool arm_cpu_get_phys_addr(CPUARMState *env, vaddr
addr,
/* translation succeeded */
result->physaddr = res.f.phys_addr;
result->attrs = res.f.attrs;
+ result->attrs.debug = 1;
I missed that because thought we'd set it on success in
cpu_translate_for_debug(), but we only do it for the fallback
case. Shouldn't it be safer to set it there instead?
Otherwise I'd expect the bit set in arm_cpu_translate_for_debug().
not in arm_cpu_get_phys_addr(). WDYT?
result->lg_page_size = res.f.lg_page_size;
}
return fault;