x86_cpu_exec_halt() now merely checks cpu_has_work() and conditionally call x86_cpu_transition_halt_to_exec(), which is now the generic flow in cpu_has_work_after_processing_async_events().
Register both process_async_events and transition_halt_to_exec handlers to use the generic target-agnostic flow, and remove the x86_cpu_exec_halt() wrapper. Signed-off-by: Philippe Mathieu-Daudé <[email protected]> --- target/i386/tcg/helper-tcg.h | 1 - target/i386/tcg/system/seg_helper.c | 11 ----------- target/i386/tcg/tcg-cpu.c | 3 ++- 3 files changed, 2 insertions(+), 13 deletions(-) diff --git a/target/i386/tcg/helper-tcg.h b/target/i386/tcg/helper-tcg.h index 65819670493..d224cb3c1c7 100644 --- a/target/i386/tcg/helper-tcg.h +++ b/target/i386/tcg/helper-tcg.h @@ -38,7 +38,6 @@ void x86_cpu_do_interrupt(CPUState *cpu); #ifndef CONFIG_USER_ONLY void x86_cpu_process_async_events(CPUState *cpu); -bool x86_cpu_exec_halt(CPUState *cpu); void x86_cpu_transition_halt_to_exec(CPUState *cpu); bool x86_need_replay_interrupt(int interrupt_request); bool x86_cpu_exec_interrupt(CPUState *cpu, int int_req); diff --git a/target/i386/tcg/system/seg_helper.c b/target/i386/tcg/system/seg_helper.c index 9b2adcca76c..7a3f14a255e 100644 --- a/target/i386/tcg/system/seg_helper.c +++ b/target/i386/tcg/system/seg_helper.c @@ -154,17 +154,6 @@ void x86_cpu_transition_halt_to_exec(CPUState *cpu) } } -bool x86_cpu_exec_halt(CPUState *cpu) -{ - if (!cpu_has_work(cpu)) { - return false; - } - - x86_cpu_transition_halt_to_exec(cpu); - - return true; -} - bool x86_need_replay_interrupt(int interrupt_request) { /* diff --git a/target/i386/tcg/tcg-cpu.c b/target/i386/tcg/tcg-cpu.c index 6f5dc06b3b9..e4fc212aca5 100644 --- a/target/i386/tcg/tcg-cpu.c +++ b/target/i386/tcg/tcg-cpu.c @@ -180,7 +180,8 @@ const TCGCPUOps x86_tcg_ops = { .tlb_fill = x86_cpu_tlb_fill, .pointer_wrap = x86_pointer_wrap, .do_interrupt = x86_cpu_do_interrupt, - .cpu_exec_halt = x86_cpu_exec_halt, + .process_async_events = x86_cpu_process_async_events, + .transition_halt_to_exec = x86_cpu_transition_halt_to_exec, .cpu_exec_interrupt = x86_cpu_exec_interrupt, .cpu_exec_reset = x86_cpu_exec_reset, .do_unaligned_access = x86_cpu_do_unaligned_access, -- 2.53.0
