Skip to contentSkip to conversation

target/i386/tcg: Fix RDPID feature check

PATCH Applied Zhao Liu 2 participants 2 messages Jun 3, 2024

lore
Share & tools
lore

Zhao Liu

author
#0 lore raw

PATCH 1/1 target/i386/tcg: Fix RDPID feature check

DisasContext.cpuid_ext_features indicates CPUID.01H.ECX.

Use DisasContext.cpuid_7_0_ecx_features field to check RDPID feature bit (CPUID_7_0_ECX_RDPID).

Fixes 6750485bf42a ("target/i386: implement RDPID in TCG")
---
 target/i386/tcg/translate.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
target/i386/tcg/translate.c +1 -1
index 6dedfe94c04c..0486ab691120 100644
@@ -3199,7 +3199,7 @@ static void disas_insn_old(DisasContext *s, CPUState *cpu, int b)
                 goto illegal_op;
             }
             if (s->prefix & PREFIX_REPZ) {
-                if (!(s->cpuid_ext_features & CPUID_7_0_ECX_RDPID)) {
+                if (!(s->cpuid_7_0_ecx_features & CPUID_7_0_ECX_RDPID)) {
                     goto illegal_op;
                 }
                 gen_helper_rdpid(s->T0, tcg_env);
Signature · 1 line
2.34.1