lkml.org 
[lkml]   [2022]   [Apr]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Subject[patch 0/3] x86/fpu/xsave: Add XSAVEC support and XGETBV1 utilization
Date
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(-)
\
 
 \ /
  Last update: 2022-04-04 14:12    [W:0.119 / U:0.076 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site