[3.8.y.z extended stable] Patch "x86, AVX-512: AVX-512 Feature Detection" has been added to staging queue

Kamal Mostafa kamal at canonical.com
Wed Apr 23 17:22:18 UTC 2014


On Tue, 2014-04-22 at 21:01 +0000, Yu, Fenghua wrote:
> > From: Kamal Mostafa [mailto:kamal at canonical.com]
> > Sent: Friday, April 18, 2014 10:44 AM
> > To: Yu, Fenghua
> > Cc: H. Peter Anvin; kernel-team at lists.ubuntu.com
> > Subject: Re: [3.8.y.z extended stable] Patch "x86, AVX-512: AVX-512
> > Feature Detection" has been added to staging queue
> > 
> > On Fri, 2014-04-18 at 02:13 +0000, Yu, Fenghua wrote:
> > > Hi, Kamal,
> > >
> > > Except the patch in your email, there is another patch:
> > > https://lkml.org/lkml/2014/2/20/546
> > >
> > > Please add this patch as well if not done yet.
> > 
> > 
> > Hi Fenghua-
> > 
> > I didn't pick up that additional patch:
> 
> Actually this patch is important for AVX 512. Without this patch, AVX 512 applications can not run because their context switch will fail.
> 
> > 
> >   c2bc11f x86, AVX-512: Enable AVX-512 States Context Switch
> > 
> > because its only (?) purpose seemed to be to modify the definition of
> > XSTATE_LAZY, which doesn't exist in 3.8-stable[0].
> 
> The point is XCNTXT_MASK has XSTATE_LAZY. So the patch actually changes XCNTXT_MASK and thus enables AVX 512 context switch.
> 
> For 3.8 kernel, you can directly add the three AVX-512 bits to XCNTXT_MASK:
> 
> -#define XCNTXT_MASK (XSTATE_FP | XSTATE_SSE | XSTATE_YMM)
> +#define XCNTXT_MASK (XSTATE_FP | XSTATE_SSE | XSTATE_YMM
> +	| XSTATE_OPMASK | XSTATE_ZMM_Hi256 | XSTATE_Hi16_ZMM)
> 
> This should work to enable AVX 512 context switch.


Very good Fenghua -- I'll apply that to XCNTXT_MASK.

Thanks for your help!

 -Kamal







More information about the kernel-team mailing list