Re: [Qemu-devel] [PATCH 2/2] ppc: Fix 64K pages support in full emulation

2016-07-01 Thread Cédric Le Goater
On 07/01/2016 12:13 AM, Benjamin Herrenschmidt wrote: > On Thu, 2016-06-30 at 18:01 +0200, Cédric Le Goater wrote: >> +static uint32_t ppc_hash64_pte_size_decode(PowerPCCPU *cpu, uint64_t >> pte0, >> + uint64_t pte1, uint32_t >> slb_pshift) >> { >> -

Re: [Qemu-devel] [PATCH 2/2] ppc: Fix 64K pages support in full emulation

2016-06-30 Thread David Gibson
On Fri, Jul 01, 2016 at 08:13:47AM +1000, Benjamin Herrenschmidt wrote: > On Thu, 2016-06-30 at 18:01 +0200, Cédric Le Goater wrote: > > +static uint32_t ppc_hash64_pte_size_decode(PowerPCCPU *cpu, uint64_t > > pte0, > > +   uint64_t pte1, uint32_t > >

Re: [Qemu-devel] [PATCH 2/2] ppc: Fix 64K pages support in full emulation

2016-06-30 Thread Benjamin Herrenschmidt
On Thu, 2016-06-30 at 18:01 +0200, Cédric Le Goater wrote: > +static uint32_t ppc_hash64_pte_size_decode(PowerPCCPU *cpu, uint64_t > pte0, > +   uint64_t pte1, uint32_t > slb_pshift) >  { > -    switch (slb_pshift) { > -    case 12: > -    return 12; > - 

Re: [Qemu-devel] [PATCH 2/2] ppc: Fix 64K pages support in full emulation

2016-06-30 Thread Cédric Le Goater
On 06/30/2016 12:56 PM, Anton Blanchard wrote: > Hi, > >> From: Benjamin Herrenschmidt >> >> We were always advertising only 4K & 16M. Additionally the code wasn't >> properly matching the page size with the PTE content, which meant we >> could potentially hit an

Re: [Qemu-devel] [PATCH 2/2] ppc: Fix 64K pages support in full emulation

2016-06-30 Thread Benjamin Herrenschmidt
On Thu, 2016-06-30 at 20:56 +1000, Anton Blanchard wrote: > Hi, > > > From: Benjamin Herrenschmidt > > > > We were always advertising only 4K & 16M. Additionally the code wasn't > > properly matching the page size with the PTE content, which meant we > > could

Re: [Qemu-devel] [PATCH 2/2] ppc: Fix 64K pages support in full emulation

2016-06-30 Thread Anton Blanchard
Hi, > From: Benjamin Herrenschmidt > > We were always advertising only 4K & 16M. Additionally the code wasn't > properly matching the page size with the PTE content, which meant we > could potentially hit an incorrect PTE if the guest used multiple > sizes. > >

Re: [Qemu-devel] [PATCH 2/2] ppc: Fix 64K pages support in full emulation

2016-06-28 Thread David Gibson
On Tue, Jun 28, 2016 at 08:48:34AM +0200, Cédric Le Goater wrote: > From: Benjamin Herrenschmidt > > We were always advertising only 4K & 16M. Additionally the code wasn't > properly matching the page size with the PTE content, which meant we > could potentially hit an

[Qemu-devel] [PATCH 2/2] ppc: Fix 64K pages support in full emulation

2016-06-28 Thread Cédric Le Goater
From: Benjamin Herrenschmidt We were always advertising only 4K & 16M. Additionally the code wasn't properly matching the page size with the PTE content, which meant we could potentially hit an incorrect PTE if the guest used multiple sizes. Finally, honor the CPU