summaryrefslogtreecommitdiff
path: root/arch/x86/include/asm/xsave.h
diff options
context:
space:
mode:
authorFenghua Yu <fenghua.yu@intel.com>2014-05-29 22:12:44 +0400
committerH. Peter Anvin <hpa@linux.intel.com>2014-05-30 01:33:09 +0400
commit7496d6458fe3219d63848ce4a9afbd86245cab22 (patch)
treee2f8a6a442d153b0708893aedc893469f6a0262d /arch/x86/include/asm/xsave.h
parent7e7ce87f6ad4e1730364e5e76628b43c5759b700 (diff)
downloadlinux-7496d6458fe3219d63848ce4a9afbd86245cab22.tar.xz
Define kernel API to get address of each state in xsave area
In standard form, each state is saved in the xsave area in fixed offset. But in compacted form, offset of each saved state only can be calculated during run time because some xstates may not be enabled and saved. We define kernel API get_xsave_addr() returns address of a given state saved in a xsave area. It can be called in kernel to get address of each xstate in xsave area in either standard format or compacted format. It's useful when kernel wants to directly access each state in xsave area. Signed-off-by: Fenghua Yu <fenghua.yu@intel.com> Link: http://lkml.kernel.org/r/1401387164-43416-17-git-send-email-fenghua.yu@intel.com Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
Diffstat (limited to 'arch/x86/include/asm/xsave.h')
-rw-r--r--arch/x86/include/asm/xsave.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/x86/include/asm/xsave.h b/arch/x86/include/asm/xsave.h
index aa3ff0cca9a1..1ba577c670ad 100644
--- a/arch/x86/include/asm/xsave.h
+++ b/arch/x86/include/asm/xsave.h
@@ -255,4 +255,7 @@ static inline int xrestore_user(struct xsave_struct __user *buf, u64 mask)
return err;
}
+void *get_xsave_addr(struct xsave_struct *xsave, int xstate);
+void setup_xstate_comp(void);
+
#endif