Displaying 2 results from an estimated 2 matches for "valid_xcr0".
Did you mean:
valid_crc
2013 Nov 19
6
[PATCH 2/5] X86 architecture instruction set extension definiation
...ZE;
- if ( eax & XSTATE_YMM )
- min_size += XSTATE_YMM_SIZE;
- BUG_ON(ecx < min_size);
-
/*
* Set CR4_OSXSAVE and run "cpuid" to get xsave_cntxt_size.
*/
@@ -327,14 +321,33 @@ unsigned int xstate_ctxt_size(u64 xcr0)
return ebx;
}
+static bool_t valid_xcr0(u64 xcr0)
+{
+ if ( !(xcr0 & XSTATE_FP) )
+ return 0;
+
+ if ( (xcr0 & XSTATE_YMM) && !(xcr0 & XSTATE_SSE) )
+ return 0;
+
+ if ( xcr0 & (XSTATE_OPMASK | XSTATE_ZMM | XSTATE_HI_ZMM) )
+ {
+ if ( !(xcr0 & XSTATE_YMM) )
+ return...
2013 Nov 25
0
[PATCH 2/4 V2] X86: enable support for new ISA extensions
...ZE;
- if ( eax & XSTATE_YMM )
- min_size += XSTATE_YMM_SIZE;
- BUG_ON(ecx < min_size);
-
/*
* Set CR4_OSXSAVE and run "cpuid" to get xsave_cntxt_size.
*/
@@ -327,14 +321,38 @@ unsigned int xstate_ctxt_size(u64 xcr0)
return ebx;
}
+static bool_t valid_xcr0(u64 xcr0)
+{
+ /* FP must be unconditionally set. */
+ if ( !(xcr0 & XSTATE_FP) )
+ return 0;
+
+ /* YMM depends on SSE. */
+ if ( (xcr0 & XSTATE_YMM) && !(xcr0 & XSTATE_SSE) )
+ return 0;
+
+ if ( xcr0 & (XSTATE_OPMASK | XSTATE_ZMM | XSTATE_HI_Z...