qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v4 01/40] hw/isa: check for current_cpu before generating IRQ


From: Alex Bennée
Subject: Re: [PATCH v4 01/40] hw/isa: check for current_cpu before generating IRQ
Date: Wed, 01 Jul 2020 17:40:50 +0100
User-agent: mu4e 1.5.3; emacs 28.0.50

Philippe Mathieu-Daudé <philmd@redhat.com> writes:

> On 7/1/20 3:56 PM, Alex Bennée wrote:
>> It's possible to trigger this function from qtest/monitor at which
>> point current_cpu won't point at the right place. Check it and
>> fall back to first_cpu if it's NULL.
>> 
>> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
>> Cc: Bug 1878645 <1878645@bugs.launchpad.net>
>> ---
>>  hw/isa/lpc_ich9.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>> 
>> diff --git a/hw/isa/lpc_ich9.c b/hw/isa/lpc_ich9.c
>> index cd6e169d47a..791c878eb0b 100644
>> --- a/hw/isa/lpc_ich9.c
>> +++ b/hw/isa/lpc_ich9.c
>> @@ -439,7 +439,7 @@ static void ich9_apm_ctrl_changed(uint32_t val, void 
>> *arg)
>>                  cpu_interrupt(cs, CPU_INTERRUPT_SMI);
>>              }
>>          } else {
>> -            cpu_interrupt(current_cpu, CPU_INTERRUPT_SMI);
>> +            cpu_interrupt(current_cpu ? current_cpu : first_cpu, 
>> CPU_INTERRUPT_SMI);
>
> I'm not sure this change anything, as first_cpu is NULL when using
> qtest accelerator or none-machine, see 508b4ecc39 ("gdbstub.c: fix
> GDB connection segfault caused by empty machines").

Good point - anyway feel free to ignore - it shouldn't have been in this
series. It was just some random experimentation I was doing when looking
at that bug.

-- 
Alex Bennée



reply via email to

[Prev in Thread] Current Thread [Next in Thread]