From e8679f5b456afdc2278913245b491a3e907cd899 Mon Sep 17 00:00:00 2001 From: Thomas Huth Date: Wed, 26 Apr 2017 06:11:47 +0200 Subject: [PATCH] monitor: Check whether TCG is enabled before running the "info jit" code The "info jit" command currently aborts on Mac OS X with the message "qemu_mutex_lock: Invalid argument" when running with "-M accel=qtest". We should only call into the TCG code here if TCG has really been enabled and initialized. Signed-off-by: Thomas Huth Message-Id: <1493179907-22516-1-git-send-email-thuth@redhat.com> Reviewed-by: Dr. David Alan Gilbert Tested-by: Peter Maydell Signed-off-by: Dr. David Alan Gilbert (cherry picked from commit b7da97eef74bf834be244de0796ccb01db3985c9) Signed-off-by: Michael Roth --- monitor.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/monitor.c b/monitor.c index 957361c6f0d..ea0a1a2bb56 100644 --- a/monitor.c +++ b/monitor.c @@ -1091,6 +1091,11 @@ static void hmp_info_registers(Monitor *mon, const QDict *qdict) static void hmp_info_jit(Monitor *mon, const QDict *qdict) { + if (!tcg_enabled()) { + error_report("JIT information is only available with accel=tcg"); + return; + } + dump_exec_info((FILE *)mon, monitor_fprintf); dump_drift_info((FILE *)mon, monitor_fprintf); } -- 2.39.5