svn commit: r250358 - stable/9/sys/amd64/amd64
Konstantin Belousov
kib at FreeBSD.org
Wed May 8 10:11:32 UTC 2013
Author: kib
Date: Wed May 8 10:11:31 2013
New Revision: 250358
URL: http://svnweb.freebsd.org/changeset/base/250358
Log:
MFC r250152:
The check to ensure that xstate_bv always has XFEATURE_ENABLED_X87 and
XFEATURE_ENABLED_SSE bits set is not needed. CPU correctly handles
any bitmask which is subset of the enabled bits in %XCR0.
More, CPU instructions XSAVE and XSAVEOPT could write the mask without
e.g. XFEATURE_ENABLED_SSE, after the VZEROALL. The check prevents the
restoration of the otherwise valid FPU save area.
Modified:
stable/9/sys/amd64/amd64/fpu.c
Directory Properties:
stable/9/sys/ (props changed)
Modified: stable/9/sys/amd64/amd64/fpu.c
==============================================================================
--- stable/9/sys/amd64/amd64/fpu.c Wed May 8 09:42:50 2013 (r250357)
+++ stable/9/sys/amd64/amd64/fpu.c Wed May 8 10:11:31 2013 (r250358)
@@ -743,9 +743,6 @@ fpusetxstate(struct thread *td, char *xf
*/
if (bv & ~xsave_mask)
return (EINVAL);
- if ((bv & (XFEATURE_ENABLED_X87 | XFEATURE_ENABLED_SSE)) !=
- (XFEATURE_ENABLED_X87 | XFEATURE_ENABLED_SSE))
- return (EINVAL);
hdr = (struct xstate_hdr *)(get_pcb_user_save_td(td) + 1);
More information about the svn-src-stable-9
mailing list