Commit c23a2b303e for qemu.org
commit c23a2b303ed86315c6549e6ce2abd9c40c0a92ba
Author: Richard Henderson <richard.henderson@linaro.org>
Date: Thu Feb 26 11:27:18 2026 +0000
target/arm: Drop kvm_arm_pmu_supported
This function has only one use, so inline it and drop the stubs.
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Message-id: 20260216034432.23912-9-richard.henderson@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
diff --git a/target/arm/kvm-stub.c b/target/arm/kvm-stub.c
index f1d0ca09e6..169ef5f206 100644
--- a/target/arm/kvm-stub.c
+++ b/target/arm/kvm-stub.c
@@ -32,11 +32,6 @@ bool kvm_arm_aarch32_supported(void)
return false;
}
-bool kvm_arm_pmu_supported(void)
-{
- return false;
-}
-
bool kvm_arm_mte_supported(void)
{
return false;
diff --git a/target/arm/kvm.c b/target/arm/kvm.c
index 495ac0709a..b8aba20f02 100644
--- a/target/arm/kvm.c
+++ b/target/arm/kvm.c
@@ -319,7 +319,7 @@ static bool kvm_arm_get_host_cpu_features(ARMHostCPUFeatures *ahcf)
1 << KVM_ARM_VCPU_PTRAUTH_GENERIC);
}
- if (kvm_arm_pmu_supported()) {
+ if (kvm_check_extension(kvm_state, KVM_CAP_ARM_PMU_V3)) {
init.features[0] |= 1 << KVM_ARM_VCPU_PMU_V3;
pmu_supported = true;
features |= 1ULL << ARM_FEATURE_PMU;
@@ -570,11 +570,6 @@ void kvm_arm_add_vcpu_properties(ARMCPU *cpu)
"Valid values are 0.1, 0.2, 1.0, 1.1, 1.2, 1.3");
}
-bool kvm_arm_pmu_supported(void)
-{
- return kvm_check_extension(kvm_state, KVM_CAP_ARM_PMU_V3);
-}
-
int kvm_arm_get_max_vm_ipa_size(MachineState *ms, bool *fixed_ipa)
{
KVMState *s = KVM_STATE(ms->accelerator);
diff --git a/target/arm/kvm_arm.h b/target/arm/kvm_arm.h
index cee06b5f0b..82ac2aae46 100644
--- a/target/arm/kvm_arm.h
+++ b/target/arm/kvm_arm.h
@@ -168,14 +168,6 @@ void kvm_arm_steal_time_finalize(ARMCPU *cpu, Error **errp);
*/
bool kvm_arm_aarch32_supported(void);
-/**
- * kvm_arm_pmu_supported:
- *
- * Returns: true if KVM can enable the PMU
- * and false otherwise.
- */
-bool kvm_arm_pmu_supported(void);
-
/**
* kvm_arm_mte_supported:
*
@@ -196,11 +188,6 @@ static inline bool kvm_arm_aarch32_supported(void)
return false;
}
-static inline bool kvm_arm_pmu_supported(void)
-{
- return false;
-}
-
static inline bool kvm_arm_mte_supported(void)
{
return false;