Add tcg_allowed, qmp_x_query_jit, qmp_x_query_opcount. These are referenced when CONFIG_TCG is enabled globally, but not for a specific target.
Signed-off-by: Richard Henderson <richard.hender...@linaro.org> --- accel/stubs/tcg-stub.c | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/accel/stubs/tcg-stub.c b/accel/stubs/tcg-stub.c index 7f4208fddf..9c2e2dc6e1 100644 --- a/accel/stubs/tcg-stub.c +++ b/accel/stubs/tcg-stub.c @@ -13,6 +13,18 @@ #include "qemu/osdep.h" #include "exec/tb-flush.h" #include "exec/exec-all.h" +#include "qapi/error.h" + +/* + * This file *ought* to be built once and linked only when required. + * However, it is built per-target, which means qemu/osdep.h has already + * undef'ed CONFIG_TCG, which hides the auto-generated declaration. + */ +#define CONFIG_TCG +#include "qapi/qapi-commands-machine.h" + + +const bool tcg_allowed = false; void tb_flush(CPUState *cpu) { @@ -27,3 +39,15 @@ G_NORETURN void cpu_loop_exit_restore(CPUState *cpu, uintptr_t pc) { g_assert_not_reached(); } + +HumanReadableText *qmp_x_query_jit(Error **errp) +{ + error_setg(errp, "JIT information is only available with accel=tcg"); + return NULL; +} + +HumanReadableText *qmp_x_query_opcount(Error **errp) +{ + error_setg(errp, "Opcode count information is only available with accel=tcg"); + return NULL; +} -- 2.43.0