[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 03/10] accel/tcg: move i386 halt handling to sysemu_ops
From: |
Alex Bennée |
Subject: |
Re: [PATCH 03/10] accel/tcg: move i386 halt handling to sysemu_ops |
Date: |
Mon, 20 Mar 2023 17:18:02 +0000 |
User-agent: |
mu4e 1.9.22; emacs 29.0.60 |
Philippe Mathieu-Daudé <philmd@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.bennee@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é <philmd@linaro.org>
--
Alex Bennée
Virtualisation Tech Lead @ Linaro
[PATCH 10/10] accel/tcg: remove unused includes, Alex Bennée, 2023/03/20
[PATCH 04/10] accel/tcg: don't bother with ifdef for CPU_DUMP_CCOP, Alex Bennée, 2023/03/20