diff options
Diffstat (limited to 'arch/x86/include/asm/xsave.h')
-rw-r--r-- | arch/x86/include/asm/xsave.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/arch/x86/include/asm/xsave.h b/arch/x86/include/asm/xsave.h index 2c4390cae228..0c72adc0cb15 100644 --- a/arch/x86/include/asm/xsave.h +++ b/arch/x86/include/asm/xsave.h | |||
@@ -111,6 +111,16 @@ static inline void xrstor_state(struct xsave_struct *fx, u64 mask) | |||
111 | : "memory"); | 111 | : "memory"); |
112 | } | 112 | } |
113 | 113 | ||
114 | static inline void xsave_state(struct xsave_struct *fx, u64 mask) | ||
115 | { | ||
116 | u32 lmask = mask; | ||
117 | u32 hmask = mask >> 32; | ||
118 | |||
119 | asm volatile(".byte " REX_PREFIX "0x0f,0xae,0x27\n\t" | ||
120 | : : "D" (fx), "m" (*fx), "a" (lmask), "d" (hmask) | ||
121 | : "memory"); | ||
122 | } | ||
123 | |||
114 | static inline void fpu_xsave(struct fpu *fpu) | 124 | static inline void fpu_xsave(struct fpu *fpu) |
115 | { | 125 | { |
116 | /* This, however, we can work around by forcing the compiler to select | 126 | /* This, however, we can work around by forcing the compiler to select |