[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 4/6] accel/tcg: Declare missing cpu_loop_exit*() stubs
From: |
Philippe Mathieu-Daudé |
Subject: |
[PATCH 4/6] accel/tcg: Declare missing cpu_loop_exit*() stubs |
Date: |
Sun, 17 Jan 2021 17:48:11 +0100 |
cpu_loop_exit*() functions are declared in accel/tcg/cpu-exec-common.c,
and are not available when TCG accelerator is not built. Add stubs so
linking without TCG succeed.
Problematic files:
- hw/semihosting/console.c in qemu_semihosting_console_inc()
- hw/ppc/spapr_hcall.c in h_confer()
- hw/s390x/ipl.c in s390_ipl_reset_request()
- hw/misc/mips_itu.c
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
I suppose the s390x kvm-only build didn't catch this because
of compiler optimization:
in s390_ipl_reset_request():
640 if (tcg_enabled()) {
641 cpu_loop_exit(cs);
642 }
and "sysemu/tcg.h" is:
13 #ifdef CONFIG_TCG
14 extern bool tcg_allowed;
15 #define tcg_enabled() (tcg_allowed)
16 #else
17 #define tcg_enabled() 0
18 #endif
---
accel/stubs/tcg-stub.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/accel/stubs/tcg-stub.c b/accel/stubs/tcg-stub.c
index 8c18d3eabdd..2304606f8e0 100644
--- a/accel/stubs/tcg-stub.c
+++ b/accel/stubs/tcg-stub.c
@@ -28,3 +28,13 @@ void *probe_access(CPUArchState *env, target_ulong addr, int
size,
/* Handled by hardware accelerator. */
g_assert_not_reached();
}
+
+void QEMU_NORETURN cpu_loop_exit(CPUState *cpu)
+{
+ g_assert_not_reached();
+}
+
+void QEMU_NORETURN cpu_loop_exit_restore(CPUState *cpu, uintptr_t pc)
+{
+ g_assert_not_reached();
+}
--
2.26.2