summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2020-11-28 19:01:00 +0100
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2020-11-28 19:01:00 +0100
commit231bd7fdc04517389135a4958294cf7630617385 (patch)
tree9713adf90a38c8cd89e8e034f84104055ca597cb
parent9dd636371312ef48fa5f6bc068360ce81d2e367f (diff)
x86: Drop XSAVE support limitation
Now that XSAVEOPT is supported, we are fine with supporting large FPU state. * i386/i386/fpu.c (init_fpu): Do not limit fp_xsave_support to CPU_XCR0_SUPPORTED. * i386/i386/fpu.h (CPU_XCR0_SUPPORTED): Remove macro.
-rw-r--r--i386/i386/fpu.c1
-rw-r--r--i386/i386/fpu.h3
2 files changed, 0 insertions, 4 deletions
diff --git a/i386/i386/fpu.c b/i386/i386/fpu.c
index 1a2830bd..b177dad2 100644
--- a/i386/i386/fpu.c
+++ b/i386/i386/fpu.c
@@ -162,7 +162,6 @@ init_fpu(void)
ecx = 0x0;
cpuid(eax, ebx, ecx, edx);
fp_xsave_support = eax + (((uint64_t) edx) << 32);
- fp_xsave_support &= CPU_XCR0_SUPPORTED;
#ifndef MACH_RING1
set_cr4(get_cr4() | CR4_OSFXSR | CR4_OSXSAVE);
diff --git a/i386/i386/fpu.h b/i386/i386/fpu.h
index deae1271..c77cc96d 100644
--- a/i386/i386/fpu.h
+++ b/i386/i386/fpu.h
@@ -107,9 +107,6 @@ static inline void set_xcr0(uint64_t value) {
#define CPU_FEATURE_XGETBV1 (1 << 2)
#define CPU_FEATURE_XSAVES (1 << 3)
-/* This is the set we support for now in our struct i386_xfp_save */
-#define CPU_XCR0_SUPPORTED (CPU_XCR0_X87 | CPU_XCR0_SSE | CPU_XCR0_AVX)
-
#define xsave(state) \
asm volatile("xsave %0" \
: "=m" (*state) \