qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH for-7.1] icount: Take iothread lock when running QEMU timers


From: Richard Henderson
Subject: Re: [PATCH for-7.1] icount: Take iothread lock when running QEMU timers
Date: Mon, 1 Aug 2022 11:12:32 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0

On 8/1/22 09:45, Peter Maydell wrote:
The function icount_prepare_for_run() is called with the iothread
unlocked, but it can call icount_notify_aio_contexts() which will
run qemu timer handlers. Those are supposed to be run only with
the iothread lock held, so take the lock while we do that.

Since icount mode runs everything on a single thread anyway,
not holding the lock is likely mostly not going to introduce
races, but it can cause us to trip over assertions that we
do hold the lock, such as the one reported in issue 1130.

Resolves:https://gitlab.com/qemu-project/qemu/-/issues/1130
Signed-off-by: Peter Maydell<peter.maydell@linaro.org>
---
  accel/tcg/tcg-accel-ops-icount.c | 6 ++++++
  1 file changed, 6 insertions(+)

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>

r~



reply via email to

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