Re: [Qemu-devel] [RFC PATCH V7 02/19] cpus: add tcg_exec_flag.

2015-08-11 Thread Paolo Bonzini
On 11/08/2015 13:11, Frederic Konrad wrote: > On 11/08/2015 12:53, Paolo Bonzini wrote: >> >> On 10/08/2015 17:27, fred.kon...@greensocs.com wrote: >>> @@ -583,5 +587,6 @@ int cpu_exec(CPUState *cpu) >>> /* fail safe : never use current_cpu outside cpu_exec() */ >>> current_cpu = NU

Re: [Qemu-devel] [RFC PATCH V7 02/19] cpus: add tcg_exec_flag.

2015-08-11 Thread Frederic Konrad
On 11/08/2015 12:53, Paolo Bonzini wrote: On 10/08/2015 17:27, fred.kon...@greensocs.com wrote: @@ -583,5 +587,6 @@ int cpu_exec(CPUState *cpu) /* fail safe : never use current_cpu outside cpu_exec() */ current_cpu = NULL; +tcg_cpu_allow_execution(cpu); I don't think this i

Re: [Qemu-devel] [RFC PATCH V7 02/19] cpus: add tcg_exec_flag.

2015-08-11 Thread Paolo Bonzini
On 10/08/2015 17:27, fred.kon...@greensocs.com wrote: > @@ -583,5 +587,6 @@ int cpu_exec(CPUState *cpu) > > /* fail safe : never use current_cpu outside cpu_exec() */ > current_cpu = NULL; > +tcg_cpu_allow_execution(cpu); I don't think this is correct; safe_work_pending() is a mu

[Qemu-devel] [RFC PATCH V7 02/19] cpus: add tcg_exec_flag.

2015-08-10 Thread fred . konrad
From: KONRAD Frederic This flag indicates the state of the VCPU thread: * 0 if the VCPU is allowed to execute code. * 1 if the VCPU is currently executing code. * -1 if the VCPU is not allowed to execute code. This allows to atomically check and run safe work or check and continue the TCG