[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [RFC][PATCH] Fix race condition on access to env->inter
From: |
malc |
Subject: |
Re: [Qemu-devel] [RFC][PATCH] Fix race condition on access to env->interrupt_request |
Date: |
Fri, 6 Mar 2009 22:06:38 +0300 (MSK) |
On Fri, 6 Mar 2009, Aurelien Jarno wrote:
> env->interrupt_request is accessed as the bit level from both main code
> and signal handler, making a race condition possible even on CISC CPU.
> This causes freeze of QEMU under high load when running the dyntick
> clock.
>
> The patch below move the bit corresponding to CPU_INTERRUPT_EXIT in a
> separate variable, declared as volatile sig_atomic_t, so it should be
> work even on RISC CPU.
>
> We may want to move the cpu_interrupt(env, CPU_INTERRUPT_EXIT) case in
> its own function and get rid of CPU_INTERRUPT_EXIT. That can be done
> later, I wanted to keep the patch short for easier review.
>
> Signed-off-by: Aurelien Jarno <address@hidden>
>
Looks good.
--
mailto:address@hidden