Displaying 4 results from an estimated 4 matches for "xsave_cntxt_size".
2013 Nov 19
6
[PATCH 2/5] X86 architecture instruction set extension definiation
...= (((u64)edx << 32) | eax) & XCNTXT_MASK;
- /* FP/SSE, XSAVE.HEADER, YMM */
- min_size = XSTATE_AREA_MIN_SIZE;
- 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 &...
2013 Jun 04
12
[PATCH 0/4] XSA-52..54 follow-up
The first patch really isn''t as much of a follow-up than what triggered
the security issues to be noticed in the first place.
1: x86: preserve FPU selectors for 32-bit guest code
2: x86: fix XCR0 handling
3: x86/xsave: adjust state management
4: x86/fxsave: bring in line with recent xsave adjustments
The first two I would see as candidates for 4.3 (as well as
subsequent backporting,
2011 Mar 14
0
[PATCH] x86: add volatile prefix for cpuid asm clauses
...alues.
The volatile prefix is required to avoid the second cpuid calls following some possible changing operations being optimized in incorrect way by compiler.
The sample bug is in xsave_init while debug=n. The second call to cpuid_count() may be optimized and lead to a BUG_ON case while compare xsave_cntxt_size with ebx.
Signed-off-by: Wei Gang <gang.wei@intel.com>
diff -r dc902ffeed73 xen/include/asm-x86/processor.h
--- a/xen/include/asm-x86/processor.h Thu Mar 10 18:37:40 2011 +0000
+++ b/xen/include/asm-x86/processor.h Wed Mar 16 02:30:49 2011 +0800
@@ -223,7 +223,7 @@ static always_inline void...
2013 Nov 25
0
[PATCH 2/4 V2] X86: enable support for new ISA extensions
...= (((u64)edx << 32) | eax) & XCNTXT_MASK;
- /* FP/SSE, XSAVE.HEADER, YMM */
- min_size = XSTATE_AREA_MIN_SIZE;
- 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) &...