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

2013-08-27 Thread liu ping fan
On Tue, Aug 27, 2013 at 11:18 PM, Alex Bligh wrote: > > On 27 Aug 2013, at 04:21, Liu Ping Fan wrote: > >> Note in tcg mode, vm_clock still read inside BQL, so icount is > > Should refer to QEMU_CLOCK_VIRTUAL if after my patches > Will change the log. >> left without private lock's protection. As

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

2013-08-27 Thread Alex Bligh
On 27 Aug 2013, at 04:21, Liu Ping Fan wrote: > Note in tcg mode, vm_clock still read inside BQL, so icount is Should refer to QEMU_CLOCK_VIRTUAL if after my patches > left without private lock's protection. As for cpu_ticks_* in > timers_state, it is still protected by BQL. I *think* what you

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

2013-08-26 Thread Liu Ping Fan
The vm_clock may be read outside BQL. This will make timers_state --the foundation of vm_clock exposed to race condition. Using private lock to protect it. Note in tcg mode, vm_clock still read inside BQL, so icount is left without private lock's protection. As for cpu_ticks_* in timers_state, it