qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH] qom/cpu: Remove cpu->exit_request from reset st


From: Peter Maydell
Subject: Re: [Qemu-devel] [PATCH] qom/cpu: Remove cpu->exit_request from reset state
Date: Thu, 20 Feb 2014 16:34:03 +0000

On 20 February 2014 16:15, Andreas Färber <address@hidden> wrote:
> Am 20.02.2014 16:58, schrieb Peter Maydell:
>> On 16 February 2014 02:07, Edgar E. Iglesias <address@hidden> wrote:
>>> Seeing this in TCG. The CPU gets signaled by the IO thread while the
>>> CPU is resetting itself. If the CPU looses the race, it clears its
>>> exit_request leaving the IO thread waiting for the global lock
>>> potentially forever.
>>>
>>> The CPU actually exits generated code but goes right back in because
>>> there is no exit_request pending.
>>
>> Yes, having looked at the code I agree with you, so:
>>
>> Reviewed-by: Peter Maydell <address@hidden>
>>
>> However, doesn't this also apply to interrupt_request ?
>
> I was wondering the same thing but didn't find time to investigate yet.
>
> Is it possible that we rather need to register some reset hook or bottom
> half to process the exit_request *before* this reset code runs?

The only way to process the exit_request is to abandon execution
of whatever instruction caused us to try to do the CPU reset.
That's in the general case impossible because we probably
got here via an emulated power control device which has
already updated its internal state and isn't capable of
rolling back.

Simply making sure we honour the exit_request as soon as we've
completed the cpu_reset is much simpler, I think.

thanks
-- PMM



reply via email to

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