qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH] cpus.c: Fix race condition in cpu_stop_current(


From: Peter Maydell
Subject: Re: [Qemu-devel] [PATCH] cpus.c: Fix race condition in cpu_stop_current()
Date: Mon, 10 Dec 2018 14:39:24 +0000

On Mon, 10 Dec 2018 at 14:30, KONRAD Frederic
<address@hidden> wrote:
>
> Hi Peter,
>
> Thanks for that patch!
>
> I'm seeing the same kind of issue when I run 8 qemu in parallel but it doesn't
> seem to be fixed by this patch. Is it supposed to fix the issue when we are
> doing a reset_request through a MMIO device?
>
> It happens (rarely) with this kind of guest code:
>
> exit:
>    write to the register to reset the device
> loop:
>    branch loop
>
> The code after the reset is executed.. can't we exit the loop directly with
> cpu_loop_exit after cpu_exit?

cpu_loop_exit would abort the execution of the store instruction
that writes to the reset register. I'm not sure that's a great
idea. My thought was more that we should just make sure that insn
is the last one in the TB, so effectively we execute that insn and
then reset the system before executing any further insns. Thinking
it over though I'm not sure that we do do anything that could
avoid having more insns following in the same TB, unless you're
using singlestep or icount...

thanks
-- PMM



reply via email to

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