Skip to content

Commit

Permalink
target/i386/tcg: Fix RDPID feature check
Browse files Browse the repository at this point in the history
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: 6750485 ("target/i386: implement RDPID in TCG")
Inspired-by: Xinyu Li <[email protected]>
Signed-off-by: Zhao Liu <[email protected]>
Message-ID: <[email protected]>
Signed-off-by: Paolo Bonzini <[email protected]>
  • Loading branch information
trueptolemy authored and bonzini committed Jun 5, 2024
1 parent 0683fff commit f2c04be
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion target/i386/tcg/translate.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit f2c04be

Please sign in to comment.