target/arm: Remove kvm test in arm_set_pmu
In kvm_arm_get_host_cpu_features, we only set ARM_FEATURE_PMU if kvm_arm_pmu_supported. In arm_cpu_post_init we only register the "pmu" property if ARM_FEATURE_PMU. Therefore, if kvm is enabled, we can only arrive in arm_set_pmu if kvm_arm_pmu_supported. Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Message-id: 20260216034432.23912-8-richard.henderson@linaro.org Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Richard Henderson committed
Feb 26, 2026 at 11:27 UTC
352051b1d2334633af163e2b26bcae4fa91a2084
1 file changed
-4
target/arm/cpu.c
-4
@@ -1224,10 +1224,6 @@ static void arm_set_pmu(Object *obj, bool value, Error **errp)
1224
ARMCPU *cpu = ARM_CPU(obj);
1225
1226
if (value) {
1227
- if (kvm_enabled() && !kvm_arm_pmu_supported()) {
1228
- error_setg(errp, "'pmu' feature not supported by KVM on this host");
1229
- return;
1230
- }
1227
set_feature(&cpu->env, ARM_FEATURE_PMU);
1228
} else {
1229
unset_feature(&cpu->env, ARM_FEATURE_PMU);