qemu/target/arm
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
..
hvf target/arm: Add ID_AA64ISAR2_EL1 2023-09-08 12:50:44 +01:00
tcg target/arm: Do not use gen_mte_checkN in trans_STGP 2023-09-08 16:41:35 +01:00
arch_dump.c
arm-powerctl.c
arm-powerctl.h
arm-qmp-cmds.c target/arm: Implement FEAT_PACQARMA3 2023-09-08 12:50:44 +01:00
common-semi-target.h
cortex-regs.c
cpregs.h target/arm: Apply access checks to neoverse-n1 special registers 2023-08-31 09:45:15 +01:00
cpu64.c target/arm: Implement FEAT_PACQARMA3 2023-09-08 12:50:44 +01:00
cpu-param.h
cpu-qom.h
cpu.c target/arm: Do all "ARM_FEATURE_X implies Y" checks in post_init 2023-08-31 11:05:04 +01:00
cpu.h target/arm: Implement FEAT_PACQARMA3 2023-09-08 12:50:44 +01:00
debug_helper.c target/arm: Special case M-profile in debug_helper.c code 2023-07-25 10:56:51 +01:00
gdbstub64.c
gdbstub.c gdbstub: replace global gdb_has_xml with a function 2023-08-30 14:57:56 +01:00
helper.c target/arm: Add ID_AA64ISAR2_EL1 2023-09-08 12:50:44 +01:00
helper.h target/arm: Demultiplex AESE and AESMC 2023-07-08 07:30:18 +01:00
hvf_arm.h hvf: add guest debugging handlers for Apple Silicon hosts 2023-06-06 10:19:30 +01:00
hyp_gdbstub.c
idau.h
internals.h target/arm: Allow cpu to configure GM blocksize 2023-08-31 09:45:14 +01:00
Kconfig
kvm64.c arm64: Restore trapless ptimer access 2023-09-08 16:41:35 +01:00
kvm_arm.h hw/intc/arm_gic: Un-inline GIC*/ITS class_name() helpers 2023-06-28 14:27:59 +02:00
kvm-consts.h
kvm-stub.c
kvm.c accel/kvm: Specify default IPA size for arm64 2023-08-22 17:31:02 +01:00
machine.c
meson.build meson: Replace softmmu_ss -> system_ss 2023-06-20 10:01:30 +02:00
op_addsub.h
ptw.c target/arm: Pass security space rather than flag for AT instructions 2023-08-22 17:31:12 +01:00
syndrome.h target/arm: Implement FEAT_FPAC and FEAT_FPACCOMBINE 2023-09-08 12:51:01 +01:00
tcg-stubs.c
trace-events target/arm/helper: Implement CNTHCTL_EL2.CNT[VP]MASK 2023-08-22 17:31:13 +01:00
trace.h
vfp_helper.c target/arm: Use float64_to_int32_modulo for FJCVTZS 2023-07-01 08:26:54 +02:00