• Paul Mackerras's avatar
    powerpc/64: Provide functions for accessing POWER9 partition table · 9d661958
    Paul Mackerras authored
    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.  This code was previously duplicated between
    hash_utils_64.c and pgtable-radix.c.
    
    This provides a function for setting a partition table entry,
    which is used in early MMU initialization, and will be used by
    KVM whenever a guest is created.  This function includes a tlbie
    instruction which will flush all TLB entries for the LPID and
    all caches of the partition table entry for the LPID, across the
    system.
    
    This also moves a call to memblock_set_current_limit(), which was
    in radix_init_partition_table(), but has nothing to do with the
    partition table.  By analogy with the similar code for hash, the
    call gets moved to near the end of radix__early_init_mmu().  It
    now gets called when running as a guest, whereas previously it
    would only be called if the kernel is running as the host.
    Signed-off-by: default avatarPaul Mackerras <paulus@ozlabs.org>
    Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
    9d661958
pgtable-radix.c 14.1 KB