This patch adds several routines that track and expose information about various XSAVE-related features.
More specifically, it adds the ability to check whether a given XFEATURE is supported and which XSAVE extensions are supported.
Furthermore, it adds several routines for calculating the size and offsets within a save area given a XSAVE feature bitmap.
Details
Details
Tested by converting D46397 to use the newly added interfaces.
No issues were encountered while tracing.
Diff Detail
Diff Detail
- Repository
- rG FreeBSD src repository
- Lint
Lint Skipped - Unit
Tests Skipped
Event Timeline
Comment Actions
A quick remark regarding code placement - I couldn't decide where this code should reside so I ultimately placed it in cpu_machdep.c, but I'm not too happy about it.
I'd certainly like to hear your thoughts on where this should reside.
Comment Actions
amd64/amd64/fpu.c seems to be the natural place for the new functions.
Despite named 'fpu', the file deals with the whole non-GPR part of the CPU state.
sys/x86/include/specialreg.h | ||
---|---|---|
381 | Commit this chunk already | |
sys/x86/x86/cpu_machdep.c | ||
1811 | Does it ever make sense to call these functions if XSAVE(S) are not supported? | |
1817 | 'else' is not needed |