From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48930) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cEjMX-0007ds-Pl for qemu-devel@nongnu.org; Wed, 07 Dec 2016 16:02:50 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cEjMW-0001KX-Ff for qemu-devel@nongnu.org; Wed, 07 Dec 2016 16:02:49 -0500 Date: Wed, 7 Dec 2016 22:01:18 +0100 From: "Edgar E. Iglesias" Message-ID: <20161207210118.GE9606@toto> References: <1481046379-32632-1-git-send-email-peter.maydell@linaro.org> <1481046379-32632-2-git-send-email-peter.maydell@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1481046379-32632-2-git-send-email-peter.maydell@linaro.org> Subject: Re: [Qemu-devel] [PATCH 1/3] target-arm: Log AArch64 exception returns List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell Cc: qemu-arm@nongnu.org, qemu-devel@nongnu.org On Tue, Dec 06, 2016 at 05:46:17PM +0000, Peter Maydell wrote: > We already log exception entry; add logging of the AArch64 exception > return path as well. > > Signed-off-by: Peter Maydell Reviewed-by: Edgar E. Iglesias > --- > target-arm/op_helper.c | 9 +++++++++ > 1 file changed, 9 insertions(+) > > diff --git a/target-arm/op_helper.c b/target-arm/op_helper.c > index cd94216..ba796d8 100644 > --- a/target-arm/op_helper.c > +++ b/target-arm/op_helper.c > @@ -17,6 +17,7 @@ > * License along with this library; if not, see . > */ > #include "qemu/osdep.h" > +#include "qemu/log.h" > #include "cpu.h" > #include "exec/helper-proto.h" > #include "internals.h" > @@ -972,6 +973,9 @@ void HELPER(exception_return)(CPUARMState *env) > } else { > env->regs[15] = env->elr_el[cur_el] & ~0x3; > } > + qemu_log_mask(CPU_LOG_INT, "Exception return from AArch64 EL%d to " > + "AArch32 EL%d PC 0x%" PRIx32 "\n", > + cur_el, new_el, env->regs[15]); > } else { > env->aarch64 = 1; > pstate_write(env, spsr); > @@ -980,6 +984,9 @@ void HELPER(exception_return)(CPUARMState *env) > } > aarch64_restore_sp(env, new_el); > env->pc = env->elr_el[cur_el]; > + qemu_log_mask(CPU_LOG_INT, "Exception return from AArch64 EL%d to " > + "AArch64 EL%d PC 0x%" PRIx64 "\n", > + cur_el, new_el, env->pc); > } > > arm_call_el_change_hook(arm_env_get_cpu(env)); > @@ -1002,6 +1009,8 @@ illegal_return: > if (!arm_singlestep_active(env)) { > env->pstate &= ~PSTATE_SS; > } > + qemu_log_mask(LOG_GUEST_ERROR, "Illegal exception return at EL%d: " > + "resuming execution at 0x%" PRIx64 "\n", cur_el, env->pc); > } > > /* Return true if the linked breakpoint entry lbn passes its checks */ > -- > 2.7.4 >