Re: [PATCHv5 08/19] x86/mm: Introduce variables to store number, shift and mask of KeyIDs

2018-07-30 Thread Kai Huang
On Tue, 2018-07-17 at 14:20 +0300, Kirill A. Shutemov wrote: > mktme_nr_keyids holds number of KeyIDs available for MKTME, excluding > KeyID zero which used by TME. MKTME KeyIDs start from 1. > > mktme_keyid_shift holds shift of KeyID within physical address. > > mktme_keyid_mask holds mask to

Re: [PATCHv5 08/19] x86/mm: Introduce variables to store number, shift and mask of KeyIDs

2018-07-30 Thread Kai Huang
On Tue, 2018-07-17 at 14:20 +0300, Kirill A. Shutemov wrote: > mktme_nr_keyids holds number of KeyIDs available for MKTME, excluding > KeyID zero which used by TME. MKTME KeyIDs start from 1. > > mktme_keyid_shift holds shift of KeyID within physical address. > > mktme_keyid_mask holds mask to

Re: [PATCHv5 08/19] x86/mm: Introduce variables to store number, shift and mask of KeyIDs

2018-07-20 Thread Kirill A. Shutemov
On Fri, Jul 20, 2018 at 03:17:54PM +0200, Thomas Gleixner wrote: > On Fri, 20 Jul 2018, Kirill A. Shutemov wrote: > > On Thu, Jul 19, 2018 at 03:40:41PM +0200, Thomas Gleixner wrote: > > > > > I still don't see how that's supposed to work. > > > > > > > > > > When the inconsistent CPU is brought

Re: [PATCHv5 08/19] x86/mm: Introduce variables to store number, shift and mask of KeyIDs

2018-07-20 Thread Kirill A. Shutemov
On Fri, Jul 20, 2018 at 03:17:54PM +0200, Thomas Gleixner wrote: > On Fri, 20 Jul 2018, Kirill A. Shutemov wrote: > > On Thu, Jul 19, 2018 at 03:40:41PM +0200, Thomas Gleixner wrote: > > > > > I still don't see how that's supposed to work. > > > > > > > > > > When the inconsistent CPU is brought

Re: [PATCHv5 08/19] x86/mm: Introduce variables to store number, shift and mask of KeyIDs

2018-07-20 Thread Thomas Gleixner
On Fri, 20 Jul 2018, Kirill A. Shutemov wrote: > On Thu, Jul 19, 2018 at 03:40:41PM +0200, Thomas Gleixner wrote: > > > > I still don't see how that's supposed to work. > > > > > > > > When the inconsistent CPU is brought up _AFTER_ MKTME is enabled, then > > > > how > > > > does clearing the

Re: [PATCHv5 08/19] x86/mm: Introduce variables to store number, shift and mask of KeyIDs

2018-07-20 Thread Thomas Gleixner
On Fri, 20 Jul 2018, Kirill A. Shutemov wrote: > On Thu, Jul 19, 2018 at 03:40:41PM +0200, Thomas Gleixner wrote: > > > > I still don't see how that's supposed to work. > > > > > > > > When the inconsistent CPU is brought up _AFTER_ MKTME is enabled, then > > > > how > > > > does clearing the

Re: [PATCHv5 08/19] x86/mm: Introduce variables to store number, shift and mask of KeyIDs

2018-07-20 Thread Kirill A. Shutemov
On Thu, Jul 19, 2018 at 03:40:41PM +0200, Thomas Gleixner wrote: > On Thu, 19 Jul 2018, Kirill A. Shutemov wrote: > > On Thu, Jul 19, 2018 at 03:18:03PM +0200, Thomas Gleixner wrote: > > > On Thu, 19 Jul 2018, Kirill A. Shutemov wrote: > > > > On Thu, Jul 19, 2018 at 02:37:35PM +0200, Thomas

Re: [PATCHv5 08/19] x86/mm: Introduce variables to store number, shift and mask of KeyIDs

2018-07-20 Thread Kirill A. Shutemov
On Thu, Jul 19, 2018 at 03:40:41PM +0200, Thomas Gleixner wrote: > On Thu, 19 Jul 2018, Kirill A. Shutemov wrote: > > On Thu, Jul 19, 2018 at 03:18:03PM +0200, Thomas Gleixner wrote: > > > On Thu, 19 Jul 2018, Kirill A. Shutemov wrote: > > > > On Thu, Jul 19, 2018 at 02:37:35PM +0200, Thomas

Re: [PATCHv5 08/19] x86/mm: Introduce variables to store number, shift and mask of KeyIDs

2018-07-20 Thread Kirill A. Shutemov
On Thu, Jul 19, 2018 at 07:23:27AM -0700, Dave Hansen wrote: > On 07/19/2018 03:21 AM, Kirill A. Shutemov wrote: > > On Wed, Jul 18, 2018 at 04:19:10PM -0700, Dave Hansen wrote: > >> On 07/17/2018 04:20 AM, Kirill A. Shutemov wrote: > >>> mktme_nr_keyids holds number of KeyIDs available for MKTME,

Re: [PATCHv5 08/19] x86/mm: Introduce variables to store number, shift and mask of KeyIDs

2018-07-20 Thread Kirill A. Shutemov
On Thu, Jul 19, 2018 at 07:23:27AM -0700, Dave Hansen wrote: > On 07/19/2018 03:21 AM, Kirill A. Shutemov wrote: > > On Wed, Jul 18, 2018 at 04:19:10PM -0700, Dave Hansen wrote: > >> On 07/17/2018 04:20 AM, Kirill A. Shutemov wrote: > >>> mktme_nr_keyids holds number of KeyIDs available for MKTME,

Re: [PATCHv5 08/19] x86/mm: Introduce variables to store number, shift and mask of KeyIDs

2018-07-19 Thread Dave Hansen
On 07/19/2018 03:21 AM, Kirill A. Shutemov wrote: > On Wed, Jul 18, 2018 at 04:19:10PM -0700, Dave Hansen wrote: >> On 07/17/2018 04:20 AM, Kirill A. Shutemov wrote: >>> mktme_nr_keyids holds number of KeyIDs available for MKTME, excluding >>> KeyID zero which used by TME. MKTME KeyIDs start from

Re: [PATCHv5 08/19] x86/mm: Introduce variables to store number, shift and mask of KeyIDs

2018-07-19 Thread Dave Hansen
On 07/19/2018 03:21 AM, Kirill A. Shutemov wrote: > On Wed, Jul 18, 2018 at 04:19:10PM -0700, Dave Hansen wrote: >> On 07/17/2018 04:20 AM, Kirill A. Shutemov wrote: >>> mktme_nr_keyids holds number of KeyIDs available for MKTME, excluding >>> KeyID zero which used by TME. MKTME KeyIDs start from

Re: [PATCHv5 08/19] x86/mm: Introduce variables to store number, shift and mask of KeyIDs

2018-07-19 Thread Thomas Gleixner
On Thu, 19 Jul 2018, Kirill A. Shutemov wrote: > On Thu, Jul 19, 2018 at 03:18:03PM +0200, Thomas Gleixner wrote: > > On Thu, 19 Jul 2018, Kirill A. Shutemov wrote: > > > On Thu, Jul 19, 2018 at 02:37:35PM +0200, Thomas Gleixner wrote: > > > > On Thu, 19 Jul 2018, Kirill A. Shutemov wrote: > > > >

Re: [PATCHv5 08/19] x86/mm: Introduce variables to store number, shift and mask of KeyIDs

2018-07-19 Thread Thomas Gleixner
On Thu, 19 Jul 2018, Kirill A. Shutemov wrote: > On Thu, Jul 19, 2018 at 03:18:03PM +0200, Thomas Gleixner wrote: > > On Thu, 19 Jul 2018, Kirill A. Shutemov wrote: > > > On Thu, Jul 19, 2018 at 02:37:35PM +0200, Thomas Gleixner wrote: > > > > On Thu, 19 Jul 2018, Kirill A. Shutemov wrote: > > > >

Re: [PATCHv5 08/19] x86/mm: Introduce variables to store number, shift and mask of KeyIDs

2018-07-19 Thread Kirill A. Shutemov
On Thu, Jul 19, 2018 at 03:18:03PM +0200, Thomas Gleixner wrote: > On Thu, 19 Jul 2018, Kirill A. Shutemov wrote: > > On Thu, Jul 19, 2018 at 02:37:35PM +0200, Thomas Gleixner wrote: > > > On Thu, 19 Jul 2018, Kirill A. Shutemov wrote: > > > > On Wed, Jul 18, 2018 at 04:19:10PM -0700, Dave Hansen

Re: [PATCHv5 08/19] x86/mm: Introduce variables to store number, shift and mask of KeyIDs

2018-07-19 Thread Kirill A. Shutemov
On Thu, Jul 19, 2018 at 03:18:03PM +0200, Thomas Gleixner wrote: > On Thu, 19 Jul 2018, Kirill A. Shutemov wrote: > > On Thu, Jul 19, 2018 at 02:37:35PM +0200, Thomas Gleixner wrote: > > > On Thu, 19 Jul 2018, Kirill A. Shutemov wrote: > > > > On Wed, Jul 18, 2018 at 04:19:10PM -0700, Dave Hansen

Re: [PATCHv5 08/19] x86/mm: Introduce variables to store number, shift and mask of KeyIDs

2018-07-19 Thread Thomas Gleixner
On Thu, 19 Jul 2018, Kirill A. Shutemov wrote: > On Thu, Jul 19, 2018 at 02:37:35PM +0200, Thomas Gleixner wrote: > > On Thu, 19 Jul 2018, Kirill A. Shutemov wrote: > > > On Wed, Jul 18, 2018 at 04:19:10PM -0700, Dave Hansen wrote: > > > > > } else { > > > > > /* > > > > >

Re: [PATCHv5 08/19] x86/mm: Introduce variables to store number, shift and mask of KeyIDs

2018-07-19 Thread Thomas Gleixner
On Thu, 19 Jul 2018, Kirill A. Shutemov wrote: > On Thu, Jul 19, 2018 at 02:37:35PM +0200, Thomas Gleixner wrote: > > On Thu, 19 Jul 2018, Kirill A. Shutemov wrote: > > > On Wed, Jul 18, 2018 at 04:19:10PM -0700, Dave Hansen wrote: > > > > > } else { > > > > > /* > > > > >

Re: [PATCHv5 08/19] x86/mm: Introduce variables to store number, shift and mask of KeyIDs

2018-07-19 Thread Kirill A. Shutemov
On Thu, Jul 19, 2018 at 02:37:35PM +0200, Thomas Gleixner wrote: > On Thu, 19 Jul 2018, Kirill A. Shutemov wrote: > > On Wed, Jul 18, 2018 at 04:19:10PM -0700, Dave Hansen wrote: > > > > } else { > > > > /* > > > > * Reset __PHYSICAL_MASK. > > > > @@ -591,6

Re: [PATCHv5 08/19] x86/mm: Introduce variables to store number, shift and mask of KeyIDs

2018-07-19 Thread Kirill A. Shutemov
On Thu, Jul 19, 2018 at 02:37:35PM +0200, Thomas Gleixner wrote: > On Thu, 19 Jul 2018, Kirill A. Shutemov wrote: > > On Wed, Jul 18, 2018 at 04:19:10PM -0700, Dave Hansen wrote: > > > > } else { > > > > /* > > > > * Reset __PHYSICAL_MASK. > > > > @@ -591,6

Re: [PATCHv5 08/19] x86/mm: Introduce variables to store number, shift and mask of KeyIDs

2018-07-19 Thread Thomas Gleixner
On Thu, 19 Jul 2018, Kirill A. Shutemov wrote: > On Wed, Jul 18, 2018 at 04:19:10PM -0700, Dave Hansen wrote: > > > } else { > > > /* > > >* Reset __PHYSICAL_MASK. > > > @@ -591,6 +592,9 @@ static void detect_tme(struct cpuinfo_x86 *c) > > >* between CPUs. > > >

Re: [PATCHv5 08/19] x86/mm: Introduce variables to store number, shift and mask of KeyIDs

2018-07-19 Thread Thomas Gleixner
On Thu, 19 Jul 2018, Kirill A. Shutemov wrote: > On Wed, Jul 18, 2018 at 04:19:10PM -0700, Dave Hansen wrote: > > > } else { > > > /* > > >* Reset __PHYSICAL_MASK. > > > @@ -591,6 +592,9 @@ static void detect_tme(struct cpuinfo_x86 *c) > > >* between CPUs. > > >

Re: [PATCHv5 08/19] x86/mm: Introduce variables to store number, shift and mask of KeyIDs

2018-07-19 Thread Kirill A. Shutemov
On Wed, Jul 18, 2018 at 04:19:10PM -0700, Dave Hansen wrote: > On 07/17/2018 04:20 AM, Kirill A. Shutemov wrote: > > mktme_nr_keyids holds number of KeyIDs available for MKTME, excluding > > KeyID zero which used by TME. MKTME KeyIDs start from 1. > > > > mktme_keyid_shift holds shift of KeyID

Re: [PATCHv5 08/19] x86/mm: Introduce variables to store number, shift and mask of KeyIDs

2018-07-19 Thread Kirill A. Shutemov
On Wed, Jul 18, 2018 at 04:19:10PM -0700, Dave Hansen wrote: > On 07/17/2018 04:20 AM, Kirill A. Shutemov wrote: > > mktme_nr_keyids holds number of KeyIDs available for MKTME, excluding > > KeyID zero which used by TME. MKTME KeyIDs start from 1. > > > > mktme_keyid_shift holds shift of KeyID

Re: [PATCHv5 08/19] x86/mm: Introduce variables to store number, shift and mask of KeyIDs

2018-07-18 Thread Dave Hansen
On 07/17/2018 04:20 AM, Kirill A. Shutemov wrote: > mktme_nr_keyids holds number of KeyIDs available for MKTME, excluding > KeyID zero which used by TME. MKTME KeyIDs start from 1. > > mktme_keyid_shift holds shift of KeyID within physical address. I know what all these words mean, but the

Re: [PATCHv5 08/19] x86/mm: Introduce variables to store number, shift and mask of KeyIDs

2018-07-18 Thread Dave Hansen
On 07/17/2018 04:20 AM, Kirill A. Shutemov wrote: > mktme_nr_keyids holds number of KeyIDs available for MKTME, excluding > KeyID zero which used by TME. MKTME KeyIDs start from 1. > > mktme_keyid_shift holds shift of KeyID within physical address. I know what all these words mean, but the

[PATCHv5 08/19] x86/mm: Introduce variables to store number, shift and mask of KeyIDs

2018-07-17 Thread Kirill A. Shutemov
mktme_nr_keyids holds number of KeyIDs available for MKTME, excluding KeyID zero which used by TME. MKTME KeyIDs start from 1. mktme_keyid_shift holds shift of KeyID within physical address. mktme_keyid_mask holds mask to extract KeyID from physical address. Signed-off-by: Kirill A. Shutemov

[PATCHv5 08/19] x86/mm: Introduce variables to store number, shift and mask of KeyIDs

2018-07-17 Thread Kirill A. Shutemov
mktme_nr_keyids holds number of KeyIDs available for MKTME, excluding KeyID zero which used by TME. MKTME KeyIDs start from 1. mktme_keyid_shift holds shift of KeyID within physical address. mktme_keyid_mask holds mask to extract KeyID from physical address. Signed-off-by: Kirill A. Shutemov