]> bbs.cooldavid.org Git - net-next-2.6.git/blobdiff - arch/x86/include/asm/xsave.h
x86, xsave: Sync xsave memory layout with its header for user handling
[net-next-2.6.git] / arch / x86 / include / asm / xsave.h
index 2c4390cae22883014816647319fb6569d6867c2c..0c72adc0cb151f04d15015ec47c1309ff82491a2 100644 (file)
@@ -111,6 +111,16 @@ static inline void xrstor_state(struct xsave_struct *fx, u64 mask)
                     :   "memory");
 }
 
+static inline void xsave_state(struct xsave_struct *fx, u64 mask)
+{
+       u32 lmask = mask;
+       u32 hmask = mask >> 32;
+
+       asm volatile(".byte " REX_PREFIX "0x0f,0xae,0x27\n\t"
+                    : : "D" (fx), "m" (*fx), "a" (lmask), "d" (hmask)
+                    :   "memory");
+}
+
 static inline void fpu_xsave(struct fpu *fpu)
 {
        /* This, however, we can work around by forcing the compiler to select