From: Thomas Huth Date: Wed, 26 Apr 2017 04:11:47 +0000 (+0200) Subject: monitor: Check whether TCG is enabled before running the "info jit" code X-Git-Tag: v2.10.0-rc0~226^2~3 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=b7da97eef;p=thirdparty%2Fqemu.git 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 --- diff --git a/monitor.c b/monitor.c index a27dc8003fa..6289e5256cd 100644 --- a/monitor.c +++ b/monitor.c @@ -1086,6 +1086,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); }