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)
commit82228e362f9b7f4b876d0fbb1036c235797c6b1d
treeba7432ffa3577cd4cadb5bd41e1fc8ac21e4a7d3
parentbb1832217a859f6dbe4a45ff2ba7fdcab0bb3958
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