Re: powerpc/mm/hash: Properly mask the ESID bits when building proto-VSID
From: Michael Ellerman <hidden>
Date: 2017-02-01 01:05:33
From: Michael Ellerman <hidden>
Date: 2017-02-01 01:05:33
On Sat, 2017-01-28 at 15:48:40 UTC, "Aneesh Kumar K.V" wrote:
proto-vsid is built using both mmu context id and ESID. We should not have
overlapping bits between those. That will result in us having vsid
collision. With the current code we missed masking the top bits of effective
address. This implies for kernel address we ended up using the top 4 bits
as part of proto-vsid, which is wrong. For the kernel we should have the
below mapping
0xf000000000000000 -> 0x7ffff (19 bits context + 6 bits ESID ).
Without the patch we endup with
0xf000000000000000 -> 0xf7ffff (0x7ffff | 0xf00000)
We didn't observe any issues till now possibly because we never end up
using a context value which could map to the same VSID as kernel.
Fixes: c60ac5693c4 ("powerpc: Update kernel VSID range")
Signed-off-by: Aneesh Kumar K.V <redacted>Applied to powerpc next, thanks. https://git.kernel.org/powerpc/c/79270e0a3fd124388a0407f9edbd6a cheers