Thread (7 messages) flat view 7 messages, 5 authors, 2018-08-23

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

From: Michael Ellerman <mpe@ellerman.id.au>
Date: 2018-08-23 11:57:33

Nicholas Piggin [off-list ref] writes:
On Wed, 22 Aug 2018 22:46:05 +0530
"Aneesh Kumar K.V" [off-list ref] wrote:
quoted
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 [off-list ref]

Signed-off-by: Aneesh Kumar K.V <redacted>
---
 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@gmail.com>
Thanks.

cheers
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help