x86/fpu/xsave: Add XSAVEC support and XGETBV1 utilization
Status from this message: The following commit has been merged into the x86/fpu branch of tip:
Get series with b4
b4 am [email protected]Versions newest first
Patches in v1 Applied
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/3 | x86/fpu/xsave: Support XSAVEC in the kernelarch/ arch/ arch/ | +48 | 2 replies | |
| 2/3 | x86/fpu/xsave: Prepare for optimized compactionarch/ arch/ | +84 | 3 replies | |
| 3/3 | x86/fpu/xsave: Optimize XSAVEC/S when XGETBV1 is supportedarch/ arch/ | +21 | 6 replies |
Reviews trailers per patch
None of the 3 patches has a Reviewed-by or Acked-by.
| Patch | Andrew Cooper |
|---|---|
| 1/3 | Requested-by |
| 2/3 | |
| 3/3 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [patch 0/3] x86/fpu/xsave: Add XSAVEC support and XGETBV1 utilization
This series adds:
1) XSAVEC support
Hypervisors expose XSAVEC but not XSAVES to guests, but the kernel does not support XSAVEC. Which means it cannot make use of the compacted storage format.
2) Utilize XGETBV1
XGETBV1 reads a bitmap which contains the current active XSTATE components. This bitmap can be used to optimize the behaviour of XSAVES and XSAVEC by requesting only the active components to be saved.
While the init optimization of XSAVEC and XSAVES skips writing the state of components which are inactive, the buffer layout is still providing the space for the inactive, but requested to save components. Which is suboptimal in terms of prefetch and dTLB when the active component bitmap is sparse.
Thanks,
tglx
--- include/asm/cpufeatures.h | 2 kernel/fpu/xstate.c | 145 +++++++++++++++++++++++++++++++++++++--------- kernel/fpu/xstate.h | 42 ++++++++++--- 3 files changed, 152 insertions(+), 37 deletions(-)