lkml.org 
[lkml]   [2018]   [Jul]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCHv5 08/19] x86/mm: Introduce variables to store number, shift and mask of KeyIDs
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.
> > > */
> > > physical_mask = (1ULL << __PHYSICAL_MASK_SHIFT) - 1;
> > > + mktme_keyid_mask = 0;
> > > + mktme_keyid_shift = 0;
> > > + mktme_nr_keyids = 0;
> > > }
> >
> > Should be unnecessary. These are zeroed by the compiler.
>
> No. detect_tme() called for each CPU in the system.

And then the variables are cleared out while other CPUs can access them?
How is that supposed to work?

Thanks,

tglx


\
 
 \ /
  Last update: 2018-07-19 14:39    [W:0.630 / U:0.184 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site