]> xenbits.xensource.com Git - xen.git/commit
x86: determine MXCSR mask in all cases
authorJan Beulich <jbeulich@suse.com>
Mon, 18 May 2020 15:18:56 +0000 (17:18 +0200)
committerJan Beulich <jbeulich@suse.com>
Mon, 18 May 2020 15:18:56 +0000 (17:18 +0200)
commit2b532519d64e653a6bbfd9eefed6040a09c8876d
treee81874b3069834abe6a1c50b9cecef310d7bc081
parent4c73a2a939a51dee47db77b31208157dbc29fe98
x86: determine MXCSR mask in all cases

For its use(s) by the emulator to be correct in all cases, the filling
of the variable needs to be independent of XSAVE availability. As
there's no suitable function in i387.c to put the logic in, keep it in
xstate_init(), arrange for the function to be called unconditionally,
and pull the logic ahead of all return paths there.

Fixes: 9a4496a35b20 ("x86emul: support {,V}{LD,ST}MXCSR")
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
xen/arch/x86/cpu/common.c
xen/arch/x86/xstate.c