Re: [PATCH V4 5/5] arch/powerpc/mm/hugetlb: NestMMU workaround for hugetlb mprotect RW upgrade

2018-12-19 Thread Christoph Hellwig
On Thu, Dec 20, 2018 at 11:30:12AM +1100, Benjamin Herrenschmidt wrote: > On Wed, 2018-12-19 at 08:50 +0530, Aneesh Kumar K.V wrote: > > Christoph Hellwig writes: > > > > > On Tue, Dec 18, 2018 at 03:11:37PM +0530, Aneesh Kumar K.V wrote: > > > > +EXPORT_SYMBOL(huge_ptep_modify_prot_start); > >

Re: [PATCH V4 5/5] arch/powerpc/mm/hugetlb: NestMMU workaround for hugetlb mprotect RW upgrade

2018-12-19 Thread Benjamin Herrenschmidt
On Wed, 2018-12-19 at 08:50 +0530, Aneesh Kumar K.V wrote: > Christoph Hellwig writes: > > > On Tue, Dec 18, 2018 at 03:11:37PM +0530, Aneesh Kumar K.V wrote: > > > +EXPORT_SYMBOL(huge_ptep_modify_prot_start); > > > > The only user of this function is the one you added in the last patch > > in

Re: [PATCH V4 5/5] arch/powerpc/mm/hugetlb: NestMMU workaround for hugetlb mprotect RW upgrade

2018-12-18 Thread Christoph Hellwig
On Wed, Dec 19, 2018 at 08:50:57AM +0530, Aneesh Kumar K.V wrote: > That was done considering that ptep_modify_prot_start/commit was defined > in asm-generic/pgtable.h. I was trying to make sure I didn't break > anything with the patch. Also s390 do have that EXPORT_SYMBOL() for the > same.

Re: [PATCH V4 5/5] arch/powerpc/mm/hugetlb: NestMMU workaround for hugetlb mprotect RW upgrade

2018-12-18 Thread Aneesh Kumar K.V
Christoph Hellwig writes: > On Tue, Dec 18, 2018 at 03:11:37PM +0530, Aneesh Kumar K.V wrote: >> +EXPORT_SYMBOL(huge_ptep_modify_prot_start); > > The only user of this function is the one you added in the last patch > in mm/hugetlb.c, so there is no need to export this function. > >> + >> +void

Re: [PATCH V4 5/5] arch/powerpc/mm/hugetlb: NestMMU workaround for hugetlb mprotect RW upgrade

2018-12-18 Thread Christoph Hellwig
On Tue, Dec 18, 2018 at 03:11:37PM +0530, Aneesh Kumar K.V wrote: > +EXPORT_SYMBOL(huge_ptep_modify_prot_start); The only user of this function is the one you added in the last patch in mm/hugetlb.c, so there is no need to export this function. > + > +void huge_ptep_modify_prot_commit(struct

[PATCH V4 5/5] arch/powerpc/mm/hugetlb: NestMMU workaround for hugetlb mprotect RW upgrade

2018-12-18 Thread Aneesh Kumar K.V
NestMMU requires us to mark the pte invalid and flush the tlb when we do a RW upgrade of pte. We fixed a variant of this in the fault path in commit Fixes: bd5050e38aec ("powerpc/mm/radix: Change pte relax sequence to handle nest MMU hang") Signed-off-by: Aneesh Kumar K.V ---