]> Git Repo - qemu.git/commitdiff
target/arm: Log fault address for M-profile faults
authorPeter Maydell <[email protected]>
Tue, 15 Mar 2022 20:43:06 +0000 (20:43 +0000)
committerPeter Maydell <[email protected]>
Fri, 18 Mar 2022 11:08:59 +0000 (11:08 +0000)
For M-profile, the fault address is not always exposed to the guest
in a fault register (for instance the BFAR bus fault address register
is only updated for bus faults on data accesses, not instruction
accesses).  Currently we log the address only if we're putting it
into a particular guest-visible register.  Since we always have it,
log it generically, to make logs of i-side faults a bit clearer.

Signed-off-by: Peter Maydell <[email protected]>
Reviewed-by: Philippe Mathieu-Daudé <[email protected]>
Reviewed-by: Richard Henderson <[email protected]>
Reviewed-by: Alex Bennée <[email protected]>
Message-id: 20220315204306.2797684[email protected]

target/arm/m_helper.c

index 3bd16c0c4657738df497c9d2dc883d10dc9b756c..b7a0fe0114123343ca1a4d5e8501aaaf6f54504c 100644 (file)
@@ -2272,7 +2272,13 @@ void arm_v7m_cpu_do_interrupt(CPUState *cs)
          * Note that for M profile we don't have a guest facing FSR, but
          * the env->exception.fsr will be populated by the code that
          * raises the fault, in the A profile short-descriptor format.
+         *
+         * Log the exception.vaddress now regardless of subtype, because
+         * logging below only logs it when it goes into a guest visible
+         * register.
          */
+        qemu_log_mask(CPU_LOG_INT, "...at fault address 0x%x\n",
+                      (uint32_t)env->exception.vaddress);
         switch (env->exception.fsr & 0xf) {
         case M_FAKE_FSR_NSC_EXEC:
             /*
This page took 0.031234 seconds and 4 git commands to generate.