mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-12-30 03:00:29 -07:00
i386/cpu: Mask with XCR0/XSS mask for FEAT_XSAVE_XCR0_HI and FEAT_XSAVE_XSS_HI leafs
The value of FEAT_XSAVE_XCR0_HI leaf and FEAT_XSAVE_XSS_HI leaf also need to be masked by XCR0 and XSS mask respectively, to make it logically correct. Fixes:301e90675c("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-3-xiaoyao.li@intel.com> Cc: qemu-stable@nongnu.org Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> (cherry picked from commita11a365159) Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
This commit is contained in:
parent
0766f137f5
commit
72c4ef9da0
1 changed files with 2 additions and 2 deletions
|
|
@ -6947,9 +6947,9 @@ static void x86_cpu_enable_xsave_components(X86CPU *cpu)
|
|||
}
|
||||
|
||||
env->features[FEAT_XSAVE_XCR0_LO] = mask & CPUID_XSTATE_XCR0_MASK;
|
||||
env->features[FEAT_XSAVE_XCR0_HI] = mask >> 32;
|
||||
env->features[FEAT_XSAVE_XCR0_HI] = (mask & CPUID_XSTATE_XCR0_MASK) >> 32;
|
||||
env->features[FEAT_XSAVE_XSS_LO] = mask & CPUID_XSTATE_XSS_MASK;
|
||||
env->features[FEAT_XSAVE_XSS_HI] = mask >> 32;
|
||||
env->features[FEAT_XSAVE_XSS_HI] = (mask & CPUID_XSTATE_XSS_MASK) >> 32;
|
||||
}
|
||||
|
||||
/***** Steps involved on loading and filtering CPUID data
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue