Skip to content

Commit 200b08a

Browse files
Fenghua YuH. Peter Anvin
authored andcommitted
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>
1 parent 0b29643 commit 200b08a

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

‎arch/x86/include/asm/xsave.h‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,12 @@ extern void xsave_init(void);
5252
extern void update_regset_xstate_info(unsigned int size, u64 xstate_mask);
5353
extern int init_fpu(struct task_struct *child);
5454

55+
#define XSAVE ".byte " REX_PREFIX "0x0f,0xae,0x27"
56+
#define XSAVEOPT ".byte " REX_PREFIX "0x0f,0xae,0x37"
57+
#define XSAVES ".byte " REX_PREFIX "0x0f,0xc7,0x2f"
58+
#define XRSTOR ".byte " REX_PREFIX "0x0f,0xae,0x2f"
59+
#define XRSTORS ".byte " REX_PREFIX "0x0f,0xc7,0x1f"
60+
5561
static inline int fpu_xrstor_checking(struct xsave_struct *fx)
5662
{
5763
int err;

0 commit comments

Comments
 (0)