Re: [Qemu-devel] [PATCH v4 2/4] timer: protect timers_state's clock with seqlock

2013-09-24 Thread liu ping fan
On Mon, Sep 23, 2013 at 2:21 PM, Jan Kiszka jan.kis...@siemens.com wrote: On 2013-09-22 10:11, Liu Ping Fan wrote: QEMU_CLOCK_VIRTUAL may be read outside BQL. This will make its foundation, i.e. timers_state exposed to race condition. Using private lock to protect it. After this patch,

Re: [Qemu-devel] [PATCH v4 2/4] timer: protect timers_state's clock with seqlock

2013-09-23 Thread Jan Kiszka
On 2013-09-22 10:11, Liu Ping Fan wrote: QEMU_CLOCK_VIRTUAL may be read outside BQL. This will make its foundation, i.e. timers_state exposed to race condition. Using private lock to protect it. After this patch, reading QEMU_CLOCK_VIRTUAL is thread safe unless use_icount is true, in which

[Qemu-devel] [PATCH v4 2/4] timer: protect timers_state's clock with seqlock

2013-09-22 Thread Liu Ping Fan
QEMU_CLOCK_VIRTUAL may be read outside BQL. This will make its foundation, i.e. timers_state exposed to race condition. Using private lock to protect it. After this patch, reading QEMU_CLOCK_VIRTUAL is thread safe unless use_icount is true, in which case the existing callers still rely on the BQL