qemu/target/arm
Philippe Mathieu-Daudé 2412813286 target/arm: Ensure icount is enabled when emulating INST_RETIRED
pmu_init() register its event checking the pm_event::supported()
handler. For INST_RETIRED, the event is only registered and the
bit enabled in the PMU Common Event Identification register when
icount is enabled as ICOUNT_PRECISE.

PMU events are TCG-only, hardware accelerators handle them
directly. Unfortunately we register the events in non-TCG builds,
leading to linking error such:

  ld: Undefined symbols:
    _icount_to_ns, referenced from:
      _instructions_ns_per in target_arm_helper.c.o
  clang: error: linker command failed with exit code 1 (use -v to see invocation)

As a kludge, give a hint to the compiler by asserting the
pm_event::get_count() and pm_event::ns_per_count() handler will
only be called under this icount mode.

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-ID: <20231208113529.74067-5-philmd@linaro.org>
2024-01-19 12:28:59 +01:00
..
hvf system/cpus: rename qemu_mutex_lock_iothread() to bql_lock() 2024-01-08 10:45:43 -05:00
tcg target/arm: Add FEAT_NV2 to max, neoverse-n2, neoverse-v1 CPUs 2024-01-09 14:44:45 +00:00
arch_dump.c target/arm: Move feature test functions to their own header 2023-10-27 11:44:32 +01:00
arm-powerctl.c system/cpus: rename qemu_mutex_lock_iothread() to bql_lock() 2024-01-08 10:45:43 -05:00
arm-powerctl.h target/arm/arm-powerctl: Add new arm_set_cpu_on_and_reset() 2019-02-28 11:03:04 +00:00
arm-qmp-cmds.c target: Use generic cpu_model_from_type() 2024-01-05 16:20:14 +01:00
common-semi-target.h target/arm/common-semi-target.h: Remove unnecessary boot.h include 2023-10-19 14:32:13 +01:00
cortex-regs.c target/arm: Saturate L2CTLR_EL1 core count field rather than overflowing 2023-05-18 11:39:33 +01:00
cpregs.h target/arm: Implement FEAT_NV2 redirection of sysregs to RAM 2024-01-09 14:43:53 +00:00
cpu64.c target/arm/kvm: Have kvm_arm_sve_get_vls take a ARMCPU argument 2023-12-19 17:57:45 +00:00
cpu-features.h target/arm: Handle HCR_EL2 accesses for FEAT_NV2 bits 2024-01-09 14:43:52 +00:00
cpu-param.h target/arm: Replace TARGET_PAGE_ENTRY_EXTRA 2023-10-03 08:01:02 -07:00
cpu-qom.h target: Move ArchCPUClass definition to 'cpu.h' 2023-11-07 13:08:48 +01:00
cpu.c accel: Do not set CPUState::tcg_cflags in non-TCG accels 2024-01-19 12:28:59 +01:00
cpu.h target/arm: Report VNCR_EL2 based faults correctly 2024-01-09 14:44:45 +00:00
debug_helper.c target/arm: Mark up VNCR offsets (offsets 0x100..0x160) 2024-01-09 14:44:45 +00:00
gdbstub64.c target/arm: Correct AArch64.S2MinTxSZ 32-bit EL1 input size check 2023-05-12 16:01:25 +01:00
gdbstub.c target/arm: Move feature test functions to their own header 2023-10-27 11:44:32 +01:00
helper.c target/arm: Ensure icount is enabled when emulating INST_RETIRED 2024-01-19 12:28:59 +01:00
helper.h target/arm: Implement FEAT_TIDCP1 2023-09-08 16:41:35 +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 arm: move KVM breakpoints helpers 2023-06-06 10:19:29 +01:00
idau.h Use DECLARE_*CHECKER* macros 2020-09-09 09:27:09 -04:00
internals.h Replace "iothread lock" with "BQL" in comments 2024-01-08 10:45:43 -05:00
Kconfig target/arm: Explain why we need to select ARM_V7M 2023-05-30 15:50:17 +01:00
kvm_arm.h target/arm/kvm: Have kvm_arm_pmu_set_irq take a ARMCPU argument 2023-12-19 17:57:46 +00:00
kvm-consts.h target/arm: Remove KVM AArch32 CPU definitions 2023-04-20 10:21:15 +01:00
kvm-stub.c target/arm: Avoid bare abort() or assert(0) 2022-05-05 09:35:51 +01:00
kvm.c system/cpus: rename qemu_mutex_lock_iothread() to bql_lock() 2024-01-08 10:45:43 -05:00
machine.c target/arm: Constify VMState in machine.c 2023-12-29 11:17:30 +11:00
meson.build meson: rename config_all 2023-12-31 09:11:28 +01:00
op_addsub.h
ptw.c target/arm: arm_pamax() no longer needs to do feature propagation 2024-01-15 17:12:22 +00:00
syndrome.h target/arm: Report VNCR_EL2 based faults correctly 2024-01-09 14:44:45 +00:00
tcg-stubs.c target/arm: Move hflags code into the tcg directory 2023-02-27 13:27:04 +00:00
trace-events target/arm/helper: Implement CNTHCTL_EL2.CNT[VP]MASK 2023-08-22 17:31:13 +01:00
trace.h trace: switch position of headers to what Meson requires 2020-08-21 06:18:24 -04:00
vfp_helper.c target/arm: Move feature test functions to their own header 2023-10-27 11:44:32 +01:00