Philippe Mathieu-Daudé <phi...@linaro.org> writes:
> On 20/3/23 11:10, Alex Bennée wrote: >> We don't want to be polluting the core run loop code with target >> specific handling, punt it to sysemu_ops where it belongs. >> Signed-off-by: Alex Bennée <alex.ben...@linaro.org> >> --- >> include/hw/core/sysemu-cpu-ops.h | 5 +++++ >> target/i386/cpu-internal.h | 1 + >> accel/tcg/cpu-exec.c | 14 +++----------- >> target/i386/cpu-sysemu.c | 12 ++++++++++++ >> target/i386/cpu.c | 1 + >> 5 files changed, 22 insertions(+), 11 deletions(-) > > >> diff --git a/target/i386/cpu-sysemu.c b/target/i386/cpu-sysemu.c >> index 28115edf44..e545bf7590 100644 >> --- a/target/i386/cpu-sysemu.c >> +++ b/target/i386/cpu-sysemu.c >> @@ -18,6 +18,7 @@ >> */ >> #include "qemu/osdep.h" >> +#include "qemu/main-loop.h" >> #include "cpu.h" >> #include "sysemu/xen.h" >> #include "sysemu/whpx.h" > > Missing "hw/i386/apic.h" which declares apic_poll_irq() ... I really need to get to the bottom of why some build hosts get away without the include. Some additional path through the include maze driven by config-host.h? > > >> @@ -310,6 +311,17 @@ void x86_cpu_apic_realize(X86CPU *cpu, Error **errp) >> } >> } >> +void x86_cpu_handle_halt(CPUState *cpu) >> +{ >> + if (cpu->interrupt_request & CPU_INTERRUPT_POLL) { >> + X86CPU *x86_cpu = X86_CPU(cpu); >> + qemu_mutex_lock_iothread(); >> + apic_poll_irq(x86_cpu->apic_state); > > ... used here. > >> + cpu_reset_interrupt(cpu, CPU_INTERRUPT_POLL); >> + qemu_mutex_unlock_iothread(); >> + } >> +} > > Otherwise, > > Reviewed-by: Philippe Mathieu-Daudé <phi...@linaro.org> -- Alex Bennée Virtualisation Tech Lead @ Linaro