Re: [Qemu-devel] [RFC v3 10/56] ppc: convert to cpu_halted

2018-10-22 Thread Emilio G. Cota
On Sun, Oct 21, 2018 at 13:56:59 +0100, Richard Henderson wrote: > On 10/19/18 2:05 AM, Emilio G. Cota wrote: > > @@ -1088,11 +1088,13 @@ static target_ulong h_cede(PowerPCCPU *cpu, > > sPAPRMachineState *spapr, > > > > env->msr |= (1ULL << MSR_EE); > > hreg_compute_hflags(env); > > +

Re: [Qemu-devel] [RFC v3 10/56] ppc: convert to cpu_halted

2018-10-21 Thread Richard Henderson
On 10/19/18 2:05 AM, Emilio G. Cota wrote: > @@ -1088,11 +1088,13 @@ static target_ulong h_cede(PowerPCCPU *cpu, > sPAPRMachineState *spapr, > > env->msr |= (1ULL << MSR_EE); > hreg_compute_hflags(env); > +cpu_mutex_lock(cs); > if (!cpu_has_work(cs)) { > -cs->halted =

[Qemu-devel] [RFC v3 10/56] ppc: convert to cpu_halted

2018-10-18 Thread Emilio G. Cota
In ppce500_spin.c, acquire the lock just once to update both cpu->halted and cpu->stopped. Cc: David Gibson Cc: Alexander Graf Cc: qemu-...@nongnu.org Signed-off-by: Emilio G. Cota --- target/ppc/helper_regs.h| 2 +- hw/ppc/e500.c | 4 ++-- hw/ppc/ppc.c