From: Richard Henderson <[email protected]> This function has only one use, so inline it and drop the stubs.
Signed-off-by: Richard Henderson <[email protected]> Reviewed-by: Peter Maydell <[email protected]> Message-id: [email protected] Signed-off-by: Peter Maydell <[email protected]> --- target/arm/kvm-stub.c | 5 ----- target/arm/kvm.c | 7 +------ target/arm/kvm_arm.h | 13 ------------- 3 files changed, 1 insertion(+), 24 deletions(-) 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; -- 2.43.0
