You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi Henrik,
I wanted to look at this issue and see if it could be addressed. Is this something you'd take outside contributions on?
I've done a bit of cursory investigation to see if I can understand some of the intent here (and because I'm not an x86 expert).
The first flag I ran across that is not directly exposed by /proc/cpuinfo is OSFXSR. I checked up on the cpuinfo documentation to get an idea of how the kernel exposes feature flags.
Looking at some documentation for the cpuid instruction, bit 24 of the double word result we get in EDX appears to indicate support for both FXSR and OSFXSR (it also implies that the OS is responsible for setting the OSFXSR bit). In addition, the comment in cpufeatures.h is consistent with this.
We do not have direct access to the CR4 register in userspace to check the OSFXSR bit (see the description field for bit 9 of CR4 on wikipedia), but we do know that the kernel only shows the sse (xmm) feature flag if the fxsr feature flag is also set.
There is the possibility of a pathological case where non-sse fxsr is supported, but the kernel setting the sse flag without true OSFXSR support would break all sse code.
So in a hypothetical pull request, I might note in the README that we cannot directly check for OSFXSR but that the presence of the sse feature flag implies OSFXSR support.
Anyway, I've laid all this out to demonstrate how I intend to approach the issue.
No description provided.
The text was updated successfully, but these errors were encountered: