Re: [Qemu-devel] [RFC v2 1/5] timer: protect timers_state with lock

2013-07-29 Thread liu ping fan
On Mon, Jul 29, 2013 at 2:26 PM, Paolo Bonzini wrote: > Il 29/07/2013 05:16, Liu Ping Fan ha scritto: >> In kvm mode, vm_clock may be read on AioContexts outside BQL(next >> patch). This will make timers_state --the foundation of vm_clock >> exposed to race condition. Using private lock to protect

Re: [Qemu-devel] [RFC v2 1/5] timer: protect timers_state with lock

2013-07-28 Thread Paolo Bonzini
Il 29/07/2013 05:16, Liu Ping Fan ha scritto: > In kvm mode, vm_clock may be read on AioContexts outside BQL(next > patch). 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

[Qemu-devel] [RFC v2 1/5] timer: protect timers_state with lock

2013-07-28 Thread Liu Ping Fan
In kvm mode, vm_clock may be read on AioContexts outside BQL(next patch). 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 change. Lock rule: private loc