powerpc/pseries: Skip using reserved virtual address range
authorAneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Wed, 22 Mar 2017 03:37:00 +0000 (09:07 +0530)
committerMichael Ellerman <mpe@ellerman.id.au>
Sat, 1 Apr 2017 10:12:27 +0000 (21:12 +1100)
commit6ed08435e3ffb9e7ca86f7f763317428fe772b36
treeba7432ffa3577cd4cadb5bd41e1fc8ac21e4a7d3
parent7b5944e2de13a922f76e6b1d4b086e2935d470e5
powerpc/pseries: Skip using reserved virtual address range

Now that we use all the available virtual address range, we need to make
sure we don't generate VSID such that it overlaps with the reserved vsid
range. Reserved vsid range include the virtual address range used by the
adjunct partition and also the VRMA virtual segment. We find the context
value that can result in generating such a VSID and reserve it early in
boot.

We don't look at the adjunct range, because for now we disable the
adjunct usage in a Linux LPAR via CAS interface.

Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
[mpe: Rewrite hash__reserve_context_id(), move the rest into pseries]
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/include/asm/book3s/64/mmu-hash.h
arch/powerpc/include/asm/kvm_book3s_64.h
arch/powerpc/include/asm/mmu_context.h
arch/powerpc/mm/hash_utils_64.c
arch/powerpc/mm/mmu_context_book3s64.c
arch/powerpc/platforms/pseries/lpar.c