Re: [Qemu-devel] [RFC PATCH V7 01/19] cpus: protect queued_work_* with work_mutex.

2015-08-10 Thread Paolo Bonzini
On 10/08/2015 17:26, fred.kon...@greensocs.com wrote: +qemu_mutex_lock(cpu-work_mutex); while ((wi = cpu-queued_work_first)) { cpu-queued_work_first = wi-next; +qemu_mutex_unlock(cpu-work_mutex); wi-func(wi-data); +

Re: [Qemu-devel] [RFC PATCH V7 01/19] cpus: protect queued_work_* with work_mutex.

2015-08-10 Thread Frederic Konrad
On 10/08/2015 17:59, Paolo Bonzini wrote: On 10/08/2015 17:26, fred.kon...@greensocs.com wrote: +qemu_mutex_lock(cpu-work_mutex); while ((wi = cpu-queued_work_first)) { cpu-queued_work_first = wi-next; +qemu_mutex_unlock(cpu-work_mutex);

Re: [Qemu-devel] [RFC PATCH V7 01/19] cpus: protect queued_work_* with work_mutex.

2015-08-10 Thread Paolo Bonzini
On 10/08/2015 18:04, Frederic Konrad wrote: On 10/08/2015 17:59, Paolo Bonzini wrote: On 10/08/2015 17:26, fred.kon...@greensocs.com wrote: +qemu_mutex_lock(cpu-work_mutex); while ((wi = cpu-queued_work_first)) { cpu-queued_work_first = wi-next; +

[Qemu-devel] [RFC PATCH V7 01/19] cpus: protect queued_work_* with work_mutex.

2015-08-10 Thread fred . konrad
From: KONRAD Frederic fred.kon...@greensocs.com This protects queued_work_* used by async_run_on_cpu, run_on_cpu and flush_queued_work with a new lock (work_mutex) to prevent multiple (concurrent) access. Signed-off-by: KONRAD Frederic fred.kon...@greensocs.com Reviewed-by: Alex Bennée