Re: [PATCH 1/3] x86, fpu: decouple non-lazy/eager fpu restore fromxsave

From: H. Peter Anvin
Date: Fri Sep 07 2012 - 14:47:49 EST


On 09/07/2012 11:31 AM, Suresh Siddha wrote:

+static inline void fx_finit(struct i387_fxsave_struct *fx)
+{
+ memset(fx, 0, xstate_size);
+ fx->cwd = 0x37f;
+ if (cpu_has_xmm)
+ fx->mxcsr = MXCSR_DEFAULT;
+}
+

Incidentally, Al Viro asked a very good question the other day, which is why can't we just set mxcsr unconditionally here? I don't think any CPUs with FXSAVE and no MXCSR (Pentium II from Intel, Crusoe/TM-3xxx/5xxx from Transmeta, and presumably some of the K6 generation from AMD) ever looked at this field.

-hpa
--
H. Peter Anvin, Intel Open Source Technology Center
I work for Intel. I don't speak on their behalf.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/