diff options
Diffstat (limited to 'src/compat/compat.h')
-rw-r--r-- | src/compat/compat.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/compat/compat.h b/src/compat/compat.h index c34f754..861601c 100644 --- a/src/compat/compat.h +++ b/src/compat/compat.h @@ -599,7 +599,7 @@ static int wg_get_device_dump_real(a, b) #include <asm/xcr.h> static inline int cpu_has_xfeatures(u64 xfeatures_needed, const char **feature_name) { - return xgetbv(XCR_XFEATURE_ENABLED_MASK) & xfeatures_needed; + return boot_cpu_has(X86_FEATURE_XSAVE) && xgetbv(XCR_XFEATURE_ENABLED_MASK) & xfeatures_needed; } #endif #ifndef XFEATURE_MASK_YMM |