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

2013-07-29 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

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 pbonz...@redhat.com 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

[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