Re: [PATCH v10 01/27] mm, powerpc, x86: define VM_PKEY_BITx bits if CONFIG_ARCH_HAS_PKEYS is enabled

2018-01-21 Thread Aneesh Kumar K.V
Ram Pai writes: > VM_PKEY_BITx are defined only if CONFIG_X86_INTEL_MEMORY_PROTECTION_KEYS > is enabled. Powerpc also needs these bits. Hence lets define the > VM_PKEY_BITx bits for any architecture that enables > CONFIG_ARCH_HAS_PKEYS. > Reviewed-by: Aneesh Kumar K.V > Sign

Re: [RFC v6 27/62] powerpc: helper to validate key-access permissions of a pte

2017-07-20 Thread Aneesh Kumar K.V
Ram Pai writes: > On Thu, Jul 20, 2017 at 12:12:47PM +0530, Aneesh Kumar K.V wrote: >> Ram Pai writes: >> >> > helper function that checks if the read/write/execute is allowed >> > on the pte. >> > >> > Signed-off-by: Ram Pai >> > -

Re: [RFC v6 27/62] powerpc: helper to validate key-access permissions of a pte

2017-07-19 Thread Aneesh Kumar K.V
Ram Pai writes: > helper function that checks if the read/write/execute is allowed > on the pte. > > Signed-off-by: Ram Pai > --- > arch/powerpc/include/asm/book3s/64/pgtable.h |4 +++ > arch/powerpc/include/asm/pkeys.h | 12 + > arch/powerpc/mm/pkeys.c

Re: [RFC v6 26/62] powerpc: Program HPTE key protection bits

2017-07-19 Thread Aneesh Kumar K.V
Ram Pai writes: > Map the PTE protection key bits to the HPTE key protection bits, > while creating HPTE entries. > Reviewed-by: Aneesh Kumar K.V > Signed-off-by: Ram Pai > --- > arch/powerpc/include/asm/book3s/64/mmu-hash.h |5 + > arch/powerp

Re: [RFC v6 11/62] powerpc: initial pkey plumbing

2017-07-19 Thread Aneesh Kumar K.V
Ram Pai writes: > basic setup to initialize the pkey system. Only 64K kernel in HPT > mode, enables the pkey system. > > Signed-off-by: Ram Pai > --- > arch/powerpc/Kconfig | 16 ++ > arch/powerpc/include/asm/mmu_context.h |5 +++ > arch/powerpc/include/asm/pkeys

Re: [RFC v6 07/62] powerpc: use helper functions in __hash_page_huge() for 64K PTE

2017-07-19 Thread Aneesh Kumar K.V
Ram Pai writes: > replace redundant code in __hash_page_huge() with helper > functions pte_get_hash_gslot() and pte_set_hash_slot() > Can you fold all the helper function usage into one patch ? > Signed-off-by: Ram Pai > --- > arch/powerpc/mm/hugetlbpage-hash64.c | 24 -

Re: [RFC v6 06/62] powerpc: use helper functions in __hash_page_64K() for 64K PTE

2017-07-19 Thread Aneesh Kumar K.V
Ram Pai writes: > replace redundant code in __hash_page_64K() with helper > functions pte_get_hash_gslot() and pte_set_hash_slot() > Reviewed-by: Aneesh Kumar K.V > Signed-off-by: Ram Pai > --- > arch/powerpc/mm/hash64_64k.c | 24 > 1 files

Re: [RFC v6 05/62] powerpc: capture the PTE format changes in the dump pte report

2017-07-19 Thread Aneesh Kumar K.V
Ram Pai writes: > The H_PAGE_F_SECOND,H_PAGE_F_GIX are not in the 64K main-PTE. > capture these changes in the dump pte report. > Reviewed-by: Aneesh Kumar K.V > Signed-off-by: Ram Pai > --- > arch/powerpc/mm/dump_linuxpagetables.c |3 ++- > 1 files changed, 2 inser

Re: [RFC v6 04/62] powerpc: introduce pte_get_hash_gslot() helper

2017-07-19 Thread Aneesh Kumar K.V
Ram Pai writes: > Introduce pte_get_hash_gslot()() which returns the slot number of the > HPTE in the global hash table. > > This function will come in handy as we work towards re-arranging the > PTE bits in the later patches. > Reviewed-by: Aneesh Kumar K.V > S

Re: [RFC v6 03/62] powerpc: introduce pte_set_hash_slot() helper

2017-07-19 Thread Aneesh Kumar K.V
st needs the slot parameter, it does > take some additional parameters to keep the prototype consistent. > > This function will be handy as we work towards re-arranging the > bits in the later patches. > Reviewed-by: Aneesh Kumar K.V > Signed-off-by: Ram Pai > --- &

Re: [RFC v6 02/62] powerpc: Free up four 64K PTE bits in 64K backed HPTE pages

2017-07-19 Thread Aneesh Kumar K.V
; '_'_'_'_'__'__'__'__'_'_'_'_'__'_'_'_'_' > > The above PTE changes is applicable to hugetlbpages aswell. > > The patch does the following code changes: > > a) moves the H_PA

Re: [RFC v6 01/62] powerpc: Free up four 64K PTE bits in 4K backed HPTE pages

2017-07-19 Thread Aneesh Kumar K.V
. > /* > @@ -116,8 +104,8 @@ int __hash_page_4K(unsigned long ea, unsigned long > access, unsigned long vsid, >* On hash insert failure we use old pte value and we don't >* want slot information there if we have a insert failure. >*/ > -

Re: [RFC v4 09/17] powerpc: call the hash functions with the correct pkey value

2017-06-27 Thread Aneesh Kumar K.V
On Tuesday 27 June 2017 03:41 PM, Ram Pai wrote: Pass the correct protection key value to the hash functions on page fault. Signed-off-by: Ram Pai --- arch/powerpc/include/asm/pkeys.h | 11 +++ arch/powerpc/mm/hash_utils_64.c | 4 arch/powerpc/mm/mem.c| 6 +

Re: [PATCH v3 5/5] mm: enable CONFIG_MOVABLE_NODE on powerpc

2016-09-26 Thread Aneesh Kumar K.V
> > Because such a node contains no normal memory, can_online_high_movable() > will only allow us to do the onlining if CONFIG_MOVABLE_NODE is set. > Enable the use of this config option on PPC64 platforms. > Reviewed-by: Aneesh Kumar K.V > Signed-off-by: Reza Arbab > --- >

Re: [PATCH v3 4/5] powerpc/mm: restore top-down allocation when using movable_node

2016-09-26 Thread Aneesh Kumar K.V
Reza Arbab writes: > At boot, the movable_node option sets bottom-up memblock allocation. > > This reduces the chance that, in the window before movable memory has > been identified, an allocation for the kernel might come from a movable > node. By going bottom-up, early allocations will most lik

Re: [PATCH v2 3/3] mm: enable CONFIG_MOVABLE_NODE on powerpc

2016-09-21 Thread Aneesh Kumar K.V
Reza Arbab writes: > On Wed, Sep 21, 2016 at 12:39:51PM +0530, Aneesh Kumar K.V wrote: >>What I was checking was how will one mark a node movable in ppc64 ? I >>don't see ppc64 code doing the equivalent of memblock_mark_hotplug(). > > Post boot, the marking mechanism

Re: [PATCH v2 3/3] mm: enable CONFIG_MOVABLE_NODE on powerpc

2016-09-21 Thread Aneesh Kumar K.V
Reza Arbab writes: > On Mon, Sep 19, 2016 at 11:59:35AM +0530, Aneesh Kumar K.V wrote: >>Movable node also does. >> memblock_set_bottom_up(true); >>What is the impact of that. Do we need changes equivalent to that ? Also >>where are we marking the nodes which can

Re: [PATCH v2 3/3] mm: enable CONFIG_MOVABLE_NODE on powerpc

2016-09-18 Thread Aneesh Kumar K.V
Reza Arbab writes: > Onlining memory into ZONE_MOVABLE requires CONFIG_MOVABLE_NODE. Enable > the use of this config option on PPC64 platforms. > > Signed-off-by: Reza Arbab > --- > Documentation/kernel-parameters.txt | 2 +- > mm/Kconfig | 2 +- > 2 files changed, 2 in