[PATCH 2/2] powerpc/mm/hash: Only need the Nest MMU workaround for R -> RW transition

Michael Ellerman mpe at ellerman.id.au
Thu Aug 23 21:57:32 AEST 2018


Nicholas Piggin <npiggin at gmail.com> writes:
> On Wed, 22 Aug 2018 22:46:05 +0530
> "Aneesh Kumar K.V" <aneesh.kumar at linux.ibm.com> wrote:
>
>> The Nest MMU workaround is only needed for RW upgrades. Avoid doing that
>> for other pte updates.
>> 
>> We also avoid clearing the pte while marking it invalid. This is because other
>> page table walk will find this pte none and can result in unexpected behaviour
>> due to that. Instead we clear _PAGE_PRESENT and set the software pte bit
>> _PAGE_INVALID. pte_present is already updated to check for bot the bits. This
>> make sure page table walkers will find the pte present and things like
>> pte_pfn(pte) returns the right value.
>> 
>> Based on the original patch from Benjamin Herrenschmidt <benh at kernel.crashing.org>
>> 
>> Signed-off-by: Aneesh Kumar K.V <aneesh.kumar at linux.ibm.com>
>> ---
>>  arch/powerpc/mm/pgtable-radix.c | 8 +++++---
>
> This is powerpc/mm/radix, isn't it? Subject says hash.

I fixed it when applying.

> Could we make this fix POWER9 only and use a RSV bit for it
> rather than use up a SW bit? Other than that,
>
> Reviewed-by: Nicholas Piggin <npiggin at gmail.com>

Thanks.

cheers


More information about the Linuxppc-dev mailing list