Date: Wed, 8 May 2013 10:11:31 +0000 (UTC) From: Konstantin Belousov <kib@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r250358 - stable/9/sys/amd64/amd64 Message-ID: <201305081011.r48ABVOH050137@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201305081011.r48ABVOH050137>