[Qemu-devel] [RFC PATCH 3/3] cpus: introduce async_run_safe_work_on_cpu.

2015-07-10 Thread fred . konrad
From: KONRAD Frederic We already had async_run_on_cpu but we need all VCPUs outside their execution loop to execute some tb_flush/invalidate task: async_run_on_cpu_safe schedule a work on a VCPU but the work start when no more VCPUs are executing code. When a safe work is pending cpu_has_work re

Re: [Qemu-devel] [RFC PATCH 3/3] cpus: introduce async_run_safe_work_on_cpu.

2015-07-10 Thread Paolo Bonzini
On 10/07/2015 17:19, fred.kon...@greensocs.com wrote: > +static void flush_queued_safe_work(CPUState *cpu) > +{ > +struct qemu_work_item *wi; > +CPUState *other_cpu; > + > +if (cpu->queued_safe_work_first == NULL) { > +return; > +} > + > +CPU_FOREACH(other_cpu) { > +