qemu/target
Paolo Bonzini 6750485bf4 target/i386: implement RDPID in TCG
RDPID corresponds to a RDMSR(TSC_AUX); however, it is unprivileged
so for user-mode emulation we must provide the value that the kernel
places in the MSR.  For Linux, it is a combination of the current CPU
and the current NUMA node, both of which can be retrieved with getcpu(2).
Also try sched_getcpu(), which might be there on the BSDs.  If there is
no portable way to retrieve the current CPU id from userspace, return 0.

RDTSCP is reimplemented as RDTSC + RDPID ECX; the differences in terms
of serializability are not relevant to QEMU.

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2023-06-26 10:23:56 +02:00
..
alpha meson: Replace softmmu_ss -> system_ss 2023-06-20 10:01:30 +02:00
arm target/arm: Fix sve predicate store, 8 <= VQ <= 15 2023-06-23 11:37:29 +01:00
avr meson: Replace softmmu_ss -> system_ss 2023-06-20 10:01:30 +02:00
cris meson: Replace softmmu_ss -> system_ss 2023-06-20 10:01:30 +02:00
hexagon target/*: Add missing includes of exec/translation-block.h 2023-06-05 12:04:29 -07:00
hppa meson: Replace softmmu_ss -> system_ss 2023-06-20 10:01:30 +02:00
i386 target/i386: implement RDPID in TCG 2023-06-26 10:23:56 +02:00
loongarch meson: Replace softmmu_ss -> system_ss 2023-06-20 10:01:30 +02:00
m68k meson: Replace softmmu_ss -> system_ss 2023-06-20 10:01:30 +02:00
microblaze meson: Replace softmmu_ss -> system_ss 2023-06-20 10:01:30 +02:00
mips meson: Replace softmmu_ss -> system_ss 2023-06-20 10:01:30 +02:00
nios2 meson: Replace softmmu_ss -> system_ss 2023-06-20 10:01:30 +02:00
openrisc meson: Replace softmmu_ss -> system_ss 2023-06-20 10:01:30 +02:00
ppc meson: Replace softmmu_ss -> system_ss 2023-06-20 10:01:30 +02:00
riscv meson: Replace softmmu_ss -> system_ss 2023-06-20 10:01:30 +02:00
rx accel/tcg: Introduce translator_io_start 2023-06-05 12:04:29 -07:00
s390x meson: Replace softmmu_ss -> system_ss 2023-06-20 10:01:30 +02:00
sh4 meson: Replace softmmu_ss -> system_ss 2023-06-20 10:01:30 +02:00
sparc meson: Replace softmmu_ss -> system_ss 2023-06-20 10:01:30 +02:00
tricore target/tricore: Fix ICR.IE offset in RESTORE insn 2023-06-21 18:09:54 +02:00
xtensa meson: Replace softmmu_ss -> system_ss 2023-06-20 10:01:30 +02:00
Kconfig hw/loongarch: Add support loongson3 virt machine type. 2022-06-06 18:09:03 +00:00
meson.build target/loongarch: Add target build suport 2022-06-06 18:09:03 +00:00