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 */
> >>
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
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.");
>
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
> +#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
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
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