qemu/target
Philippe Mathieu-Daudé a9e445df54 target/i386/hvf: Use env_archcpu() in simulate_[rdmsr/wrmsr]()
When CPUArchState* is available (here CPUX86State*), we can
use the fast env_archcpu() macro to get ArchCPU* (here X86CPU*).
The QOM cast X86_CPU() macro will be slower when building with
--enable-qom-cast-debug.

Pass CPUX86State* as argument to simulate_rdmsr / simulate_wrmsr
instead of a CPUState* to avoid an extra cast.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Roman Bolshakov <roman@roolebo.dev>
Tested-by: Roman Bolshakov <roman@roolebo.dev>
Reviewed-by: Zhao Liu <zhao1.liu@intel.com>
Message-Id: <20231009110239.66778-7-philmd@linaro.org>
2023-11-07 12:13:27 +01:00
..
alpha target: Declare FOO_CPU_TYPE_NAME/SUFFIX in 'cpu-qom.h' 2023-11-07 12:13:27 +01:00
arm target/arm: Move internal declarations from 'cpu-qom.h' to 'cpu.h' 2023-11-07 12:13:27 +01:00
avr target: Declare FOO_CPU_TYPE_NAME/SUFFIX in 'cpu-qom.h' 2023-11-07 12:13:27 +01:00
cris target: Declare FOO_CPU_TYPE_NAME/SUFFIX in 'cpu-qom.h' 2023-11-07 12:13:27 +01:00
hexagon target/hexagon: Declare QOM definitions in 'cpu-qom.h' 2023-11-07 12:13:27 +01:00
hppa target: Mention 'cpu-qom.h' is target agnostic 2023-11-07 12:13:27 +01:00
i386 target/i386/hvf: Use env_archcpu() in simulate_[rdmsr/wrmsr]() 2023-11-07 12:13:27 +01:00
loongarch target/loongarch: Declare QOM definitions in 'cpu-qom.h' 2023-11-07 12:13:27 +01:00
m68k target: Declare FOO_CPU_TYPE_NAME/SUFFIX in 'cpu-qom.h' 2023-11-07 12:13:27 +01:00
microblaze target: Mention 'cpu-qom.h' is target agnostic 2023-11-07 12:13:27 +01:00
mips target: Declare FOO_CPU_TYPE_NAME/SUFFIX in 'cpu-qom.h' 2023-11-07 12:13:27 +01:00
nios2 target/nios2: Declare QOM definitions in 'cpu-qom.h' 2023-11-07 12:13:27 +01:00
openrisc target/openrisc: Declare QOM definitions in 'cpu-qom.h' 2023-11-07 12:13:27 +01:00
ppc target/ppc: Use env_archcpu() in helper_book3s_msgsndp() 2023-11-07 12:13:27 +01:00
riscv target/riscv: Use env_archcpu() in [check_]nanbox() 2023-11-07 12:13:27 +01:00
rx target: Declare FOO_CPU_TYPE_NAME/SUFFIX in 'cpu-qom.h' 2023-11-07 12:13:27 +01:00
s390x target/s390x: Use env_archcpu() in handle_diag_308() 2023-11-07 12:13:27 +01:00
sh4 target: Declare FOO_CPU_TYPE_NAME/SUFFIX in 'cpu-qom.h' 2023-11-07 12:13:27 +01:00
sparc target: Declare FOO_CPU_TYPE_NAME/SUFFIX in 'cpu-qom.h' 2023-11-07 12:13:27 +01:00
tricore target: Declare FOO_CPU_TYPE_NAME/SUFFIX in 'cpu-qom.h' 2023-11-07 12:13:27 +01:00
xtensa target/xtensa: Use env_archcpu() in update_c[compare|count]() 2023-11-07 12:13:27 +01:00
Kconfig
meson.build