diff mbox series

target/i386: fix SSE and SSE2 featue check

Message ID 20240602100904.2137939-1-lixinyu20s@ict.ac.cn (mailing list archive)
State New, archived
Headers show
Series target/i386: fix SSE and SSE2 featue check | expand

Commit Message

李欣宇 June 2, 2024, 10:09 a.m. UTC
From: Xinyu Li <lixinyu@loongson.cn>

Featues check of CPUID_SSE and CPUID_SSE2 shoule use cpuid_features,
rather than cpuid_ext_features

Signed-off-by: Xinyu Li <lixinyu20s@ict.ac.cn>
---
 target/i386/tcg/decode-new.c.inc | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Zhao Liu June 2, 2024, 10:48 a.m. UTC | #1
On Sun, Jun 02, 2024 at 06:09:04PM +0800, lixinyu20s@ict.ac.cn wrote:
> Date: Sun,  2 Jun 2024 18:09:04 +0800
> From: lixinyu20s@ict.ac.cn
> Subject: [PATCH] target/i386: fix SSE and SSE2 featue check
> X-Mailer: git-send-email 2.34.1
> 
> From: Xinyu Li <lixinyu@loongson.cn>
> 
> Featues check of CPUID_SSE and CPUID_SSE2 shoule use cpuid_features,
> rather than cpuid_ext_features

It's better to add a Fixes tag,

Fixes: caa01fadbef1 ("target/i386: add CPUID feature checks to new decoder")

> Signed-off-by: Xinyu Li <lixinyu20s@ict.ac.cn>
> ---
>  target/i386/tcg/decode-new.c.inc | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)

Reviewed-by: Zhao Liu <zhao1.liu@intel.com>
Paolo Bonzini June 3, 2024, 7:21 a.m. UTC | #2
Queued, thanks.

Paolo
Fiona Ebner June 4, 2024, 9:42 a.m. UTC | #3
Am 02.06.24 um 12:48 schrieb Zhao Liu:
> On Sun, Jun 02, 2024 at 06:09:04PM +0800, lixinyu20s@ict.ac.cn wrote:
>> Date: Sun,  2 Jun 2024 18:09:04 +0800
>> From: lixinyu20s@ict.ac.cn
>> Subject: [PATCH] target/i386: fix SSE and SSE2 featue check
>> X-Mailer: git-send-email 2.34.1
>>
>> From: Xinyu Li <lixinyu@loongson.cn>
>>
>> Featues check of CPUID_SSE and CPUID_SSE2 shoule use cpuid_features,
>> rather than cpuid_ext_features
> 
> It's better to add a Fixes tag,
> 
> Fixes: caa01fadbef1 ("target/i386: add CPUID feature checks to new decoder")
> 

CC-ing stable, because caa01fadbef1 has been there since v7.2.0
diff mbox series

Patch

diff --git a/target/i386/tcg/decode-new.c.inc b/target/i386/tcg/decode-new.c.inc
index 27dc1bb146..0ec849b003 100644
--- a/target/i386/tcg/decode-new.c.inc
+++ b/target/i386/tcg/decode-new.c.inc
@@ -2041,9 +2041,9 @@  static bool has_cpuid_feature(DisasContext *s, X86CPUIDFeature cpuid)
     case X86_FEAT_PCLMULQDQ:
         return (s->cpuid_ext_features & CPUID_EXT_PCLMULQDQ);
     case X86_FEAT_SSE:
-        return (s->cpuid_ext_features & CPUID_SSE);
+        return (s->cpuid_features & CPUID_SSE);
     case X86_FEAT_SSE2:
-        return (s->cpuid_ext_features & CPUID_SSE2);
+        return (s->cpuid_features & CPUID_SSE2);
     case X86_FEAT_SSE3:
         return (s->cpuid_ext_features & CPUID_EXT_SSE3);
     case X86_FEAT_SSSE3: