aboutsummaryrefslogtreecommitdiff
path: root/target/i386/tcg/translate.c
diff options
context:
space:
mode:
authorZhao Liu <zhao1.liu@intel.com>2024-06-03 16:07:23 +0800
committerPaolo Bonzini <pbonzini@redhat.com>2024-06-05 11:01:05 +0200
commitf2c04bede384608a1ab4f66865dd0e2a433ed94c (patch)
tree7a61530df58cb83e604137bb2e6a6da0fb784976 /target/i386/tcg/translate.c
parent0683fff1cf7d495e50955a946bf59f8b9c20c3f1 (diff)
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") Inspired-by: Xinyu Li <lixinyu20s@ict.ac.cn> Signed-off-by: Zhao Liu <zhao1.liu@intel.com> Message-ID: <20240603080723.1256662-1-zhao1.liu@intel.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'target/i386/tcg/translate.c')
-rw-r--r--target/i386/tcg/translate.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/target/i386/tcg/translate.c b/target/i386/tcg/translate.c
index 6dedfe94c0..0486ab6911 100644
--- a/target/i386/tcg/translate.c
+++ b/target/i386/tcg/translate.c
@@ -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);