[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v4 14/30] target/i386: Restrict has_work() handler to sysemu and
From: |
Philippe Mathieu-Daudé |
Subject: |
[PATCH v4 14/30] target/i386: Restrict has_work() handler to sysemu and TCG |
Date: |
Sun, 12 Sep 2021 19:27:15 +0200 |
Restrict has_work() to TCG sysemu.
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
target/i386/cpu.c | 6 ------
target/i386/tcg/tcg-cpu.c | 8 +++++++-
2 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/target/i386/cpu.c b/target/i386/cpu.c
index 04f59043804..b7417d29f44 100644
--- a/target/i386/cpu.c
+++ b/target/i386/cpu.c
@@ -6548,11 +6548,6 @@ int x86_cpu_pending_interrupt(CPUState *cs, int
interrupt_request)
return 0;
}
-static bool x86_cpu_has_work(CPUState *cs)
-{
- return x86_cpu_pending_interrupt(cs, cs->interrupt_request) != 0;
-}
-
static void x86_disas_set_info(CPUState *cs, disassemble_info *info)
{
X86CPU *cpu = X86_CPU(cs);
@@ -6757,7 +6752,6 @@ static void x86_cpu_common_class_init(ObjectClass *oc,
void *data)
cc->class_by_name = x86_cpu_class_by_name;
cc->parse_features = x86_cpu_parse_featurestr;
- cc->has_work = x86_cpu_has_work;
cc->dump_state = x86_cpu_dump_state;
cc->set_pc = x86_cpu_set_pc;
cc->gdb_read_register = x86_cpu_gdb_read_register;
diff --git a/target/i386/tcg/tcg-cpu.c b/target/i386/tcg/tcg-cpu.c
index 3ecfae34cb5..aef050d0898 100644
--- a/target/i386/tcg/tcg-cpu.c
+++ b/target/i386/tcg/tcg-cpu.c
@@ -55,6 +55,11 @@ static void x86_cpu_synchronize_from_tb(CPUState *cs,
}
#ifndef CONFIG_USER_ONLY
+static bool x86_cpu_has_work(CPUState *cs)
+{
+ return x86_cpu_pending_interrupt(cs, cs->interrupt_request) != 0;
+}
+
static bool x86_debug_check_breakpoint(CPUState *cs)
{
X86CPU *cpu = X86_CPU(cs);
@@ -63,7 +68,7 @@ static bool x86_debug_check_breakpoint(CPUState *cs)
/* RF disables all architectural breakpoints. */
return !(env->eflags & RF_MASK);
}
-#endif
+#endif /* CONFIG_USER_ONLY */
#include "hw/core/tcg-cpu-ops.h"
@@ -76,6 +81,7 @@ static const struct TCGCPUOps x86_tcg_ops = {
#ifdef CONFIG_USER_ONLY
.fake_user_interrupt = x86_cpu_do_interrupt,
#else
+ .has_work = x86_cpu_has_work,
.do_interrupt = x86_cpu_do_interrupt,
.cpu_exec_interrupt = x86_cpu_exec_interrupt,
.debug_excp_handler = breakpoint_handler,
--
2.31.1
- [PATCH v4 04/30] sysemu: Introduce AccelOpsClass::has_work(), (continued)
- [PATCH v4 04/30] sysemu: Introduce AccelOpsClass::has_work(), Philippe Mathieu-Daudé, 2021/09/12
- [PATCH v4 05/30] accel/kvm: Implement AccelOpsClass::has_work(), Philippe Mathieu-Daudé, 2021/09/12
- [PATCH v4 07/30] accel/tcg: Implement AccelOpsClass::has_work() as stub, Philippe Mathieu-Daudé, 2021/09/12
- [PATCH v4 06/30] accel/whpx: Implement AccelOpsClass::has_work(), Philippe Mathieu-Daudé, 2021/09/12
- [PATCH v4 08/30] target/alpha: Restrict has_work() handler to sysemu, Philippe Mathieu-Daudé, 2021/09/12
- [PATCH v4 09/30] target/arm: Restrict has_work() handler to sysemu and TCG, Philippe Mathieu-Daudé, 2021/09/12
- [PATCH v4 10/30] target/avr: Restrict has_work() handler to sysemu, Philippe Mathieu-Daudé, 2021/09/12
- [PATCH v4 11/30] target/cris: Restrict has_work() handler to sysemu, Philippe Mathieu-Daudé, 2021/09/12
- [PATCH v4 12/30] target/hexagon: Remove unused has_work() handler, Philippe Mathieu-Daudé, 2021/09/12
- [PATCH v4 13/30] target/hppa: Restrict has_work() handler to sysemu, Philippe Mathieu-Daudé, 2021/09/12
- [PATCH v4 14/30] target/i386: Restrict has_work() handler to sysemu and TCG,
Philippe Mathieu-Daudé <=
- [PATCH v4 15/30] target/m68k: Restrict has_work() handler to sysemu, Philippe Mathieu-Daudé, 2021/09/12
- [PATCH v4 16/30] target/microblaze: Restrict has_work() handler to sysemu, Philippe Mathieu-Daudé, 2021/09/12
- [PATCH v4 17/30] target/mips: Restrict has_work() handler to sysemu and TCG, Philippe Mathieu-Daudé, 2021/09/12
- [PATCH v4 18/30] target/nios2: Restrict has_work() handler to sysemu, Philippe Mathieu-Daudé, 2021/09/12
- [PATCH v4 19/30] target/openrisc: Restrict has_work() handler to sysemu, Philippe Mathieu-Daudé, 2021/09/12
- [PATCH v4 20/30] target/ppc: Introduce PowerPCCPUClass::has_work(), Philippe Mathieu-Daudé, 2021/09/12
- [PATCH v4 21/30] target/ppc: Restrict has_work() handlers to sysemu and TCG, Philippe Mathieu-Daudé, 2021/09/12
- [PATCH v4 22/30] target/riscv: Restrict has_work() handler to sysemu and TCG, Philippe Mathieu-Daudé, 2021/09/12