qemu-e2k/target
Colton Lewis 682814e2a3 arm64: Restore trapless ptimer access
Due to recent KVM changes, QEMU is setting a ptimer offset resulting
in unintended trap and emulate access and a consequent performance
hit. Filter out the PTIMER_CNT register to restore trapless ptimer
access.

Quoting Andrew Jones:

Simply reading the CNT register and writing back the same value is
enough to set an offset, since the timer will have certainly moved
past whatever value was read by the time it's written.  QEMU
frequently saves and restores all registers in the get-reg-list array,
unless they've been explicitly filtered out (with Linux commit
680232a94c12, KVM_REG_ARM_PTIMER_CNT is now in the array). So, to
restore trapless ptimer accesses, we need a QEMU patch to filter out
the register.

See
https://lore.kernel.org/kvmarm/gsntttsonus5.fsf@coltonlewis-kvm.c.googlers.com/T/#m0770023762a821db2a3f0dd0a7dc6aa54e0d0da9
for additional context.

Cc: qemu-stable@nongnu.org
Signed-off-by: Andrew Jones <andrew.jones@linux.dev>
Signed-off-by: Colton Lewis <coltonlewis@google.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Tested-by: Colton Lewis <coltonlewis@google.com>
Message-id: 20230831190052.129045-1-coltonlewis@google.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2023-09-08 16:41:35 +01:00
..
alpha target/translate: Remove unnecessary 'exec/cpu_ldst.h' header 2023-08-31 19:47:43 +02:00
arm arm64: Restore trapless ptimer access 2023-09-08 16:41:35 +01:00
avr target/translate: Include missing 'exec/cpu_ldst.h' header 2023-08-31 19:47:43 +02:00
cris target/helpers: Remove unnecessary 'exec/cpu_ldst.h' header 2023-08-31 19:47:43 +02:00
hexagon target/translate: Remove unnecessary 'exec/cpu_ldst.h' header 2023-08-31 19:47:43 +02:00
hppa target/translate: Remove unnecessary 'exec/cpu_ldst.h' header 2023-08-31 19:47:43 +02:00
i386 * only build util/async-teardown.c when system build is requested 2023-09-07 10:29:06 -04:00
loongarch target/helpers: Remove unnecessary 'qemu/main-loop.h' header 2023-08-31 19:47:43 +02:00
m68k target/translate: Remove unnecessary 'exec/cpu_ldst.h' header 2023-08-31 19:47:43 +02:00
microblaze target/translate: Remove unnecessary 'exec/cpu_ldst.h' header 2023-08-31 19:47:43 +02:00
mips hw/mips: spelling fixes 2023-08-31 19:47:43 +02:00
nios2 target/helpers: Remove unnecessary 'qemu/main-loop.h' header 2023-08-31 19:47:43 +02:00
openrisc target/translate: Remove unnecessary 'exec/cpu_ldst.h' header 2023-08-31 19:47:43 +02:00
ppc target/ppc: Fix the order of kvm_enable judgment about kvmppc_set_interrupt() 2023-09-06 11:19:33 +02:00
riscv target/helpers: Remove unnecessary 'qemu/main-loop.h' header 2023-08-31 19:47:43 +02:00
rx include/exec: Replace target_ulong with abi_ptr in cpu_[st|ld]*() 2023-08-24 11:21:46 -07:00
s390x * Use precise selfmodifying code mode on s390x TCG 2023-09-05 09:22:13 -04:00
sh4 target/translate: Remove unnecessary 'exec/cpu_ldst.h' header 2023-08-31 19:47:43 +02:00
sparc target/translate: Remove unnecessary 'exec/cpu_ldst.h' header 2023-08-31 19:47:43 +02:00
tricore target/tricore: Replace gen_cond_w with tcg_gen_negsetcond_tl 2023-08-24 11:22:42 -07:00
xtensa target/xtensa: Include missing 'qemu/atomic.h' header 2023-08-31 19:47:43 +02:00
Kconfig
meson.build