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: KONRAD Frederic
Subject: Re: [Qemu-devel] [PATCH] cpus.c: Fix race condition in cpu_stop_current()
Date: Mon, 10 Dec 2018 15:52:28 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.3.2



Le 12/10/18 à 3:39 PM, Peter Maydell a écrit :
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...

Exactly I think we don't do anything for that.. But we can't guess which IO will
require the loop to be exited though..

Fred


thanks
-- PMM




reply via email to

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