[3.8.y.z extended stable] Patch "x86, AVX-512: AVX-512 Feature Detection" has been added to staging queue
Yu, Fenghua
fenghua.yu at intel.com
Tue Apr 22 21:01:04 UTC 2014
> 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.
>
> Would just adding the additional XSTATE_ definitions be useful for
> 3.8-stable for some other reason?
If you want 3.8-stable to support AVX 512 feature, then this additional patch is a must-have patch. Otherwise, it's unnecessary to add this patch.
>
> Thanks for reviewing this!
>
> -Kamal
>
More information about the kernel-team
mailing list