@samitouri / QOSamiQemu / commits / 6c6e24166f

target/arm: ensure we create the wxft_timer for all modes

We don't want to just use it for timeouts as we will calculate which will comes first. Remove the wxft feature test in favour of the broader architecture checks. Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-id: 20260624103049.884930-5-alex.bennee@linaro.org Signed-off-by: Peter Maydell <peter.maydell@linaro.org>

Alex Bennée committed Jun 24, 2026 at 11:30 UTC 6c6e24166fc36d98fec76f7f20d9444ded45a49b
2 files changed +6 -2
target/arm/cpu.c
+5 -1
@@ -2273,7 +2273,11 @@ static void arm_cpu_realizefn(DeviceState *dev, Error **errp)
2273 }
2274
2275 #ifndef CONFIG_USER_ONLY
2276 - if (tcg_enabled() && cpu_isar_feature(aa64_wfxt, cpu)) {
2276 + /*
2277 + * We use the wfxt_timer for timeouts and event stream so we
2278 + * enable from V6K up. There is no event stream on M-profile.
2279 + */
2280 + if (tcg_enabled() && arm_feature(env, ARM_FEATURE_V6K)) {
2281 cpu->wfxt_timer = timer_new_ns(QEMU_CLOCK_VIRTUAL,
2282 arm_wfxt_timer_cb, cpu);
2283 }
target/arm/cpu.h
+1 -1
@@ -967,7 +967,7 @@ struct ArchCPU {
967 * pmu_op_finish() - it does not need other handling during migration
968 */
969 QEMUTimer *pmu_timer;
970 - /* Timer used for WFxT timeouts */
970 + /* Timer used for WFxT timeouts OR event stream events */
971 QEMUTimer *wfxt_timer;
972
973 /* GPIO outputs for generic timer */