diff options
author | Xiaoyao Li <xiaoyao.li@intel.com> | 2024-01-15 04:13:24 -0500 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2024-02-16 13:56:08 +0100 |
commit | 81f5cad3858f27623b1b14467926032d229b76cc (patch) | |
tree | e488c04e53fb250f524e5e5852c3b55710b642cd /target | |
parent | 3ff11e4dcabe2b5b4c26e49d741018ec326f127f (diff) |
i386/cpu: Clear FEAT_XSAVE_XSS_LO/HI leafs when CPUID_EXT_XSAVE is not available
Leaf FEAT_XSAVE_XSS_LO and FEAT_XSAVE_XSS_HI also need to be cleared
when CPUID_EXT_XSAVE is not set.
Fixes: 301e90675c3f ("target/i386: Enable support for XSAVES based features")
Signed-off-by: Xiaoyao Li <xiaoyao.li@intel.com>
Reviewed-by: Yang Weijiang <weijiang.yang@intel.com>
Message-ID: <20240115091325.1904229-2-xiaoyao.li@intel.com>
Cc: qemu-stable@nongnu.org
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'target')
-rw-r--r-- | target/i386/cpu.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/target/i386/cpu.c b/target/i386/cpu.c index 0cd32a6fce..800caeb593 100644 --- a/target/i386/cpu.c +++ b/target/i386/cpu.c @@ -6927,6 +6927,8 @@ static void x86_cpu_enable_xsave_components(X86CPU *cpu) if (!(env->features[FEAT_1_ECX] & CPUID_EXT_XSAVE)) { env->features[FEAT_XSAVE_XCR0_LO] = 0; env->features[FEAT_XSAVE_XCR0_HI] = 0; + env->features[FEAT_XSAVE_XSS_LO] = 0; + env->features[FEAT_XSAVE_XSS_HI] = 0; return; } |