[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v2 07/14] accel/stubs: Expand stubs for TCG
From: |
Richard Henderson |
Subject: |
[PATCH v2 07/14] accel/stubs: Expand stubs for TCG |
Date: |
Sun, 2 Feb 2025 19:18:14 -0800 |
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.henderson@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
- [PATCH v2 05/14] tcg: Link only when required in system mode, (continued)
[PATCH v2 09/14] gitlab: Replace aarch64 with arm in cross-i686-tci build, Richard Henderson, 2025/02/02
[PATCH v2 10/14] configure: Define TARGET_LONG_BITS in configs/targets/*.mak, Richard Henderson, 2025/02/02