* [tip:x86/xsave] x86/xsaves: Define macros for xsave instructions
[not found] <1401387164-43416-7-git-send-email-fenghua.yu@intel.com>
@ 2014-05-30 15:11 ` tip-bot for Fenghua Yu
2014-05-31 3:36 ` [tip:x86/xsave] x86/xsave: Make it clear that the XSAVE macros use (%edi)/(%rdi) tip-bot for H. Peter Anvin
1 sibling, 0 replies; 2+ messages in thread
From: tip-bot for Fenghua Yu @ 2014-05-30 15:11 UTC (permalink / raw)
To: linux-tip-commits; +Cc: linux-kernel, hpa, mingo, fenghua.yu, tglx, hpa
Commit-ID: 200b08a970b2ae764b670a326088ab8bc0a989cc
Gitweb: http://git.kernel.org/tip/200b08a970b2ae764b670a326088ab8bc0a989cc
Author: Fenghua Yu <fenghua.yu@intel.com>
AuthorDate: Thu, 29 May 2014 11:12:34 -0700
Committer: H. Peter Anvin <hpa@linux.intel.com>
CommitDate: Thu, 29 May 2014 14:31:16 -0700
x86/xsaves: Define macros for xsave instructions
Define macros for xsave, xsaveopt, xsaves, xrstor, and xrstors inline
instructions. The instructions will be used for saving and restoring xstate.
Signed-off-by: Fenghua Yu <fenghua.yu@intel.com>
Link: http://lkml.kernel.org/r/1401387164-43416-7-git-send-email-fenghua.yu@intel.com
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
---
arch/x86/include/asm/xsave.h | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/arch/x86/include/asm/xsave.h b/arch/x86/include/asm/xsave.h
index d949ef2..71bdde4 100644
--- a/arch/x86/include/asm/xsave.h
+++ b/arch/x86/include/asm/xsave.h
@@ -52,6 +52,12 @@ extern void xsave_init(void);
extern void update_regset_xstate_info(unsigned int size, u64 xstate_mask);
extern int init_fpu(struct task_struct *child);
+#define XSAVE ".byte " REX_PREFIX "0x0f,0xae,0x27"
+#define XSAVEOPT ".byte " REX_PREFIX "0x0f,0xae,0x37"
+#define XSAVES ".byte " REX_PREFIX "0x0f,0xc7,0x2f"
+#define XRSTOR ".byte " REX_PREFIX "0x0f,0xae,0x2f"
+#define XRSTORS ".byte " REX_PREFIX "0x0f,0xc7,0x1f"
+
static inline int fpu_xrstor_checking(struct xsave_struct *fx)
{
int err;
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [tip:x86/xsave] x86/xsave: Make it clear that the XSAVE macros use (%edi)/(%rdi)
[not found] <1401387164-43416-7-git-send-email-fenghua.yu@intel.com>
2014-05-30 15:11 ` [tip:x86/xsave] x86/xsaves: Define macros for xsave instructions tip-bot for Fenghua Yu
@ 2014-05-31 3:36 ` tip-bot for H. Peter Anvin
1 sibling, 0 replies; 2+ messages in thread
From: tip-bot for H. Peter Anvin @ 2014-05-31 3:36 UTC (permalink / raw)
To: linux-tip-commits; +Cc: linux-kernel, hpa, mingo, fenghua.yu, tglx, hpa
Commit-ID: c9e5a5a7034146493386d985ff432aed8059929a
Gitweb: http://git.kernel.org/tip/c9e5a5a7034146493386d985ff432aed8059929a
Author: H. Peter Anvin <hpa@linux.intel.com>
AuthorDate: Fri, 30 May 2014 08:19:21 -0700
Committer: H. Peter Anvin <hpa@linux.intel.com>
CommitDate: Fri, 30 May 2014 08:19:21 -0700
x86/xsave: Make it clear that the XSAVE macros use (%edi)/(%rdi)
The XSAVE instruction family takes a memory argment. The macros use
(%edi)/(%rdi) as that memory argument - make that clear to the reader.
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
Cc: Fenghua Yu <fenghua.yu@intel.com>
Link: http://lkml.kernel.org/r/1401387164-43416-7-git-send-email-fenghua.yu@intel.com
---
arch/x86/include/asm/xsave.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/x86/include/asm/xsave.h b/arch/x86/include/asm/xsave.h
index 1ba577c..bbebd6e 100644
--- a/arch/x86/include/asm/xsave.h
+++ b/arch/x86/include/asm/xsave.h
@@ -52,6 +52,7 @@ extern void xsave_init(void);
extern void update_regset_xstate_info(unsigned int size, u64 xstate_mask);
extern int init_fpu(struct task_struct *child);
+/* These macros all use (%edi)/(%rdi) as the single memory argument. */
#define XSAVE ".byte " REX_PREFIX "0x0f,0xae,0x27"
#define XSAVEOPT ".byte " REX_PREFIX "0x0f,0xae,0x37"
#define XSAVES ".byte " REX_PREFIX "0x0f,0xc7,0x2f"
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-05-31 3:36 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <1401387164-43416-7-git-send-email-fenghua.yu@intel.com>
2014-05-30 15:11 ` [tip:x86/xsave] x86/xsaves: Define macros for xsave instructions tip-bot for Fenghua Yu
2014-05-31 3:36 ` [tip:x86/xsave] x86/xsave: Make it clear that the XSAVE macros use (%edi)/(%rdi) tip-bot for H. Peter Anvin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).