On Mon, 16 Feb 2026 at 03:45, Richard Henderson <[email protected]> wrote: > > 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 <[email protected]> > --- > target/arm/cpu.c | 4 ---- > 1 file changed, 4 deletions(-) > > diff --git a/target/arm/cpu.c b/target/arm/cpu.c > index 7542444b18..16ce5f300d 100644 > --- a/target/arm/cpu.c > +++ b/target/arm/cpu.c > @@ -1218,10 +1218,6 @@ static void arm_set_pmu(Object *obj, bool value, Error > **errp) > ARMCPU *cpu = ARM_CPU(obj); > > if (value) { > - if (kvm_enabled() && !kvm_arm_pmu_supported()) { > - error_setg(errp, "'pmu' feature not supported by KVM on this > host"); > - return; > - } > set_feature(&cpu->env, ARM_FEATURE_PMU); > } else { > unset_feature(&cpu->env, ARM_FEATURE_PMU); > -- > 2.43.0 >
Reviewed-by: Peter Maydell <[email protected]> thanks -- PMM
