Re: [PATCH 02/13] powerpc/64: Provide functions for accessing POWER9 partition table

2016-11-20 Thread Paul Mackerras
On Sat, Nov 19, 2016 at 12:05:21PM +0530, Aneesh Kumar K.V wrote: > Paul Mackerras writes: > > > On Fri, Nov 18, 2016 at 07:57:30PM +0530, Aneesh Kumar K.V wrote: > >> Paul Mackerras writes: > >> + > >> > +/* Global flush of TLBs and partition table caches for this > >> > lpid */ > >>

Re: [PATCH 02/13] powerpc/64: Provide functions for accessing POWER9 partition table

2016-11-18 Thread Aneesh Kumar K.V
Paul Mackerras writes: > On Fri, Nov 18, 2016 at 07:57:30PM +0530, Aneesh Kumar K.V wrote: >> Paul Mackerras writes: >> + >> > + /* Global flush of TLBs and partition table caches for this lpid */ >> > + asm volatile("ptesync"); >> > + asm volatile(PPC_TLBIE_5(%0,%1,2,0,0) : : "r"(0x800), "r

Re: [PATCH 02/13] powerpc/64: Provide functions for accessing POWER9 partition table

2016-11-18 Thread Paul Mackerras
On Sat, Nov 19, 2016 at 11:45:52AM +1100, Balbir Singh wrote: > > +#ifdef CONFIG_PPC_BOOK3S_64 > > +void mmu_partition_table_init(void) > > +{ > > + unsigned long patb_size = 1UL << PATB_SIZE_SHIFT; > > + > > + BUILD_BUG_ON_MSG((PATB_SIZE_SHIFT > 24), "Partition table size too > > large."); >

Re: [PATCH 02/13] powerpc/64: Provide functions for accessing POWER9 partition table

2016-11-18 Thread Paul Mackerras
On Fri, Nov 18, 2016 at 07:57:30PM +0530, Aneesh Kumar K.V wrote: > Paul Mackerras writes: > + > > + /* Global flush of TLBs and partition table caches for this lpid */ > > + asm volatile("ptesync"); > > + asm volatile(PPC_TLBIE_5(%0,%1,2,0,0) : : "r"(0x800), "r" (lpid)); > > + asm volati

Re: [PATCH 02/13] powerpc/64: Provide functions for accessing POWER9 partition table

2016-11-18 Thread Balbir Singh
> +#ifdef CONFIG_PPC_BOOK3S_64 > +void mmu_partition_table_init(void) > +{ > + unsigned long patb_size = 1UL << PATB_SIZE_SHIFT; > + > + BUILD_BUG_ON_MSG((PATB_SIZE_SHIFT > 24), "Partition table size too > large."); This should be 36 (12 + 24) > + partition_tb = __va(memblock_alloc_b

Re: [PATCH 02/13] powerpc/64: Provide functions for accessing POWER9 partition table

2016-11-18 Thread Aneesh Kumar K.V
Paul Mackerras writes: + > + /* Global flush of TLBs and partition table caches for this lpid */ > + asm volatile("ptesync"); > + asm volatile(PPC_TLBIE_5(%0,%1,2,0,0) : : "r"(0x800), "r" (lpid)); > + asm volatile("eieio; tlbsync; ptesync" : : : "memory"); > +} It would be nice

[PATCH 02/13] powerpc/64: Provide functions for accessing POWER9 partition table

2016-11-17 Thread Paul Mackerras
POWER9 requires the host to set up a partition table, which is a table in memory indexed by logical partition ID (LPID) which contains the pointers to page tables and process tables for the host and each guest. This factors out the initialization of the partition table into a single function. Thi