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

2015-07-13 Thread Paolo Bonzini
On 13/07/2015 18:20, Alex Bennée wrote: >> +static void qemu_cpu_kick_thread(CPUState *cpu) >> +{ >> +#ifndef _WIN32 >> +int err; >> + >> +err = pthread_kill(cpu->thread->thread, SIG_IPI); >> +if (err) { >> +fprintf(stderr, "qemu:%s: %s", __func__, strerror(err)); >> +

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

2015-07-13 Thread Alex Bennée
fred.kon...@greensocs.com writes: > 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 executin

[Qemu-devel] [RFC PATCH V2 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