[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] sh4-linux-user: fix multi-threading regression.
From: |
Peter Maydell |
Subject: |
Re: [Qemu-devel] [PATCH] sh4-linux-user: fix multi-threading regression. |
Date: |
Mon, 26 Mar 2012 18:23:58 +0100 |
2012/3/26 Cédric VINCENT <address@hidden>:
> This reverts commit fd4bab10 "target-sh4: optimize exceptions":
[cc'ing Aurelien as the author of that commit]
> the function cpu_restore_state() isn't expected to be called in user-mode,
Is this really true? host_signal_handler() calls cpu_signal_handler()
calls handle_cpu_signala) calls cpu_restore_state() so hopefully
it's OK to be called in at least *some* situations...
> as a consequence it isn't protected from race conditions. For
> information, syscalls are exceptions on Linux/SH4.
>
> There were two possible fixes: either "tb_lock" is acquired/released
> around the call to cpu_restore_state() [1] or the commit that
> introduced this regression is reverted [2].
Can you explain a bit further what the race condition is that occurs
here?
NB the whole tb_lock thing is broken anyway.
thanks
-- PMM