]> git.karo-electronics.de Git - linux-beck.git/commit
x86/xsaves: Use xsave/xrstor for saving and restoring user space context
authorFenghua Yu <fenghua.yu@intel.com>
Thu, 29 May 2014 18:12:38 +0000 (11:12 -0700)
committerH. Peter Anvin <hpa@linux.intel.com>
Thu, 29 May 2014 21:32:57 +0000 (14:32 -0700)
commitfacbf4d91ae64f84ef93a00e4037135cd9f4b2ab
treeb2f8cdf1e2ecfd04cf901421f03fd340581a3d1f
parentf9de314b340f4816671f037e79ed01f685ac9787
x86/xsaves: Use xsave/xrstor for saving and restoring user space context

We use legacy xsave/xrstor to save and restore standard form of xsave area
in user space context. No xsaveopt or xsaves is used here for two reasons.

First, we don't want to use modified optimization which is implemented in
xsaveopt and xsaves because xrstor/xrstors might track a wrong user space
application.

Secondly, we don't use compacted format of xsave area for backward
compatibility because legacy user space applications only don't understand
the compacted format of the xsave area.

Using standard form of the xsave area may allocate more memory for
user context than compacted form, but preserves compatibility with
legacy applications.  Furthermore, even with holes, the relevant cache
lines don't get touched and thus the performance impact is limited.

Signed-off-by: Fenghua Yu <fenghua.yu@intel.com>
Link: http://lkml.kernel.org/r/1401387164-43416-11-git-send-email-fenghua.yu@intel.com
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
arch/x86/include/asm/xsave.h