Source-Changes-D archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: CVS commit: src/sys/arch



Le 20/06/2018 à 16:31, Jaromír Doleček a écrit :
The function is ever called only with x86_fpu_save >= FPU_SAVE_FXSAVE,
so there should be no change in functionality AFAICS.

There is a change in functionality, you added an xsave check in a function
that is fxsave-specific. xsave != fxsave.

The function calls fxsave to get the MXCSR_MASK value. There is absolutely
no reason to set the value to the default __INITIAL_MXCSR_MASK__ if xsave
is not supported -- the availability of xsave does not dictate what should
be the MXCSR_MASK value.

The operation of this function is described in the Intel SDM, section 11.6.3
of 253665-sdm-vol-1.pdf, page 276/482:

1. Establish a 512-byte FXSAVE area in memory.
2. Clear the FXSAVE area to all 0s.
3. Execute the FXSAVE instruction, using the address of the first byte of the
   cleared FXSAVE area as a source operand.
4. Check the value in the MXCSR_MASK field in the FXSAVE image (bytes 28
   through 31).

I haven't tested but looking at the code it seems to me that this part of your
change breaks DAZ on native, and I don't see how it can help xsave on xen by
the way


Home | Main Index | Thread Index | Old Index