Re: [Qemu-devel] [PATCH v3 05/10] ppc/pnv: add a PnvCore object

2016-09-21 Thread Cédric Le Goater
>> +static void powernv_cpu_init(PowerPCCPU *cpu, Error **errp) >> +{ >> +CPUPPCState *env = &cpu->env; >> + >> +/* Set time-base frequency to 512 MHz */ >> +cpu_ppc_tb_init(env, PNV_TIMEBASE_FREQ); >> + >> +/* MSR[IP] doesn't exist nowadays */ >> +env->msr_mask &= ~(1 << 6); >

Re: [Qemu-devel] [PATCH v3 05/10] ppc/pnv: add a PnvCore object

2016-09-21 Thread Cédric Le Goater
On 09/21/2016 04:05 AM, Benjamin Herrenschmidt wrote: > On Wed, 2016-09-21 at 11:51 +1000, David Gibson wrote: >> Ok, as noted elsewhere, I think you need to disassociate the PIR value >> from the cpu_index. It may be a little less elegant, but it'll make >> your life much easier in the short and

Re: [Qemu-devel] [PATCH v3 05/10] ppc/pnv: add a PnvCore object

2016-09-21 Thread Cédric Le Goater
On 09/21/2016 03:51 AM, David Gibson wrote: > On Thu, Sep 15, 2016 at 02:45:55PM +0200, Cédric Le Goater wrote: >> This is largy inspired by sPAPRCPUCore with some simplification, no >> hotplug for instance. But the differences are small and the objects >> could possibly be merged. >> >> A set of P

Re: [Qemu-devel] [PATCH v3 05/10] ppc/pnv: add a PnvCore object

2016-09-20 Thread David Gibson
On Wed, Sep 21, 2016 at 12:05:47PM +1000, Benjamin Herrenschmidt wrote: > On Wed, 2016-09-21 at 11:51 +1000, David Gibson wrote: > > Ok, as noted elsewhere, I think you need to disassociate the PIR value > > from the cpu_index.  It may be a little less elegant, but it'll make > > your life much eas

Re: [Qemu-devel] [PATCH v3 05/10] ppc/pnv: add a PnvCore object

2016-09-20 Thread Benjamin Herrenschmidt
On Wed, 2016-09-21 at 11:51 +1000, David Gibson wrote: > Ok, as noted elsewhere, I think you need to disassociate the PIR value > from the cpu_index.  It may be a little less elegant, but it'll make > your life much easier in the short and medium term. > > Apart from that, this looks pretty good,

Re: [Qemu-devel] [PATCH v3 05/10] ppc/pnv: add a PnvCore object

2016-09-20 Thread David Gibson
On Thu, Sep 15, 2016 at 02:45:55PM +0200, Cédric Le Goater wrote: > This is largy inspired by sPAPRCPUCore with some simplification, no > hotplug for instance. But the differences are small and the objects > could possibly be merged. > > A set of PnvCore objects is added to the PnvChip and the dev

[Qemu-devel] [PATCH v3 05/10] ppc/pnv: add a PnvCore object

2016-09-15 Thread Cédric Le Goater
This is largy inspired by sPAPRCPUCore with some simplification, no hotplug for instance. But the differences are small and the objects could possibly be merged. A set of PnvCore objects is added to the PnvChip and the device tree is populated looping on these cores. Real HW cpu ids are now gener