A requirement for setting AVX-512 is to have both SSE and AVX enabled. Add these masks to ensure AVX-512 gets cleared if either SSE or AVX are clear. Signed-off-by: Aaron Lewis <aaronlewis@xxxxxxxxxx> --- arch/x86/kvm/cpuid.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/kvm/cpuid.c b/arch/x86/kvm/cpuid.c index 76379a51a16d..1eff76f836a2 100644 --- a/arch/x86/kvm/cpuid.c +++ b/arch/x86/kvm/cpuid.c @@ -68,7 +68,7 @@ static u64 sanitize_xcr0(u64 xcr0) if ((xcr0 & mask) != mask) xcr0 &= ~mask; - mask = XFEATURE_MASK_AVX512; + mask = XFEATURE_MASK_AVX512 | XFEATURE_MASK_SSE | XFEATURE_MASK_YMM; if ((xcr0 & mask) != mask) xcr0 &= ~XFEATURE_MASK_AVX512; -- 2.39.2.637.g21b0678d19-goog