Re: [PATCH 03/25] powerpc: track allocation status of all pkeys

2017-10-24 Thread Ram Pai
On Tue, Oct 24, 2017 at 11:58:29AM +0530, Aneesh Kumar K.V wrote: > Ram Pai writes: > + > > +#define mm_set_pkey_is_allocated(mm, pkey) \ > > + (mm_pkey_allocation_map(mm) & pkey_alloc_mask(pkey)) > > + > > > static inline bool mm_pkey_is_allocated(struct mm_struct *mm, int pkey) > > { > > -

Re: [PATCH 03/25] powerpc: track allocation status of all pkeys

2017-10-23 Thread Aneesh Kumar K.V
Ram Pai writes: + > +#define mm_set_pkey_is_allocated(mm, pkey) \ > + (mm_pkey_allocation_map(mm) & pkey_alloc_mask(pkey)) > + > static inline bool mm_pkey_is_allocated(struct mm_struct *mm, int pkey) > { > - return (pkey == 0); > + /* a reserved key is never considered as 'expli

Re: [PATCH 03/25] powerpc: track allocation status of all pkeys

2017-10-23 Thread Ram Pai
On Mon, Oct 23, 2017 at 03:11:28PM +0530, Aneesh Kumar K.V wrote: > Ram Pai writes: > > > Total 32 keys are available on power7 and above. However > > pkey 0,1 are reserved. So effectively we have 30 pkeys. > > When you say reserved, reserved by whom? Is that part of ISA or PAPR ? > Also do yo

Re: [PATCH 03/25] powerpc: track allocation status of all pkeys

2017-10-23 Thread Aneesh Kumar K.V
Ram Pai writes: > Total 32 keys are available on power7 and above. However > pkey 0,1 are reserved. So effectively we have 30 pkeys. When you say reserved, reserved by whom? Is that part of ISA or PAPR ? Also do you expect that to change. If not why all these indirection? Can we have the mask

Re: [PATCH 03/25] powerpc: track allocation status of all pkeys

2017-10-17 Thread Balbir Singh
On Fri, 8 Sep 2017 15:44:51 -0700 Ram Pai wrote: > Total 32 keys are available on power7 and above. However > pkey 0,1 are reserved. So effectively we have 30 pkeys. > > On 4K kernels, we do not have 5 bits in the PTE to > represent all the keys; we only have 3bits.Two of those > keys

Re: [PATCH 03/25] powerpc: track allocation status of all pkeys

2017-10-08 Thread Ram Pai
On Sat, Oct 07, 2017 at 09:02:55PM +1100, Michael Ellerman wrote: > Ram Pai writes: > > > Total 32 keys are available on power7 and above. However > > pkey 0,1 are reserved. So effectively we have 30 pkeys. > > > > On 4K kernels, we do not have 5 bits in the PTE to > > represent all the

Re: [PATCH 03/25] powerpc: track allocation status of all pkeys

2017-10-07 Thread Michael Ellerman
Ram Pai writes: > Total 32 keys are available on power7 and above. However > pkey 0,1 are reserved. So effectively we have 30 pkeys. > > On 4K kernels, we do not have 5 bits in the PTE to > represent all the keys; we only have 3bits.Two of those > keys are reserved; pkey 0 and pkey 1. So

[PATCH 03/25] powerpc: track allocation status of all pkeys

2017-09-08 Thread Ram Pai
Total 32 keys are available on power7 and above. However pkey 0,1 are reserved. So effectively we have 30 pkeys. On 4K kernels, we do not have 5 bits in the PTE to represent all the keys; we only have 3bits.Two of those keys are reserved; pkey 0 and pkey 1. So effectively we have 6 pkeys