diff mbox series

[09/21] target/arm/kvm: Inline kvm_arm_steal_time_supported

Message ID 20231123044219.896776-10-richard.henderson@linaro.org
State New
Headers show
Series target/arm: kvm cleanups | expand

Commit Message

Richard Henderson Nov. 23, 2023, 4:42 a.m. UTC
This function is only used once, and is quite simple.

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
 target/arm/kvm_arm.h | 13 -------------
 target/arm/kvm64.c   |  7 +------
 2 files changed, 1 insertion(+), 19 deletions(-)

Comments

Philippe Mathieu-Daudé Nov. 23, 2023, 11:41 a.m. UTC | #1
On 23/11/23 05:42, Richard Henderson wrote:
> This function is only used once, and is quite simple.
> 
> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
> ---
>   target/arm/kvm_arm.h | 13 -------------
>   target/arm/kvm64.c   |  7 +------
>   2 files changed, 1 insertion(+), 19 deletions(-)

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Gavin Shan Nov. 26, 2023, 11:57 p.m. UTC | #2
On 11/23/23 15:42, Richard Henderson wrote:
> This function is only used once, and is quite simple.
> 
> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
> ---
>   target/arm/kvm_arm.h | 13 -------------
>   target/arm/kvm64.c   |  7 +------
>   2 files changed, 1 insertion(+), 19 deletions(-)
> 

Reviewed-by: Gavin Shan <gshan@redhat.com>
diff mbox series

Patch

diff --git a/target/arm/kvm_arm.h b/target/arm/kvm_arm.h
index e7c32f6ed0..58c087207f 100644
--- a/target/arm/kvm_arm.h
+++ b/target/arm/kvm_arm.h
@@ -274,14 +274,6 @@  void kvm_arm_add_vcpu_properties(Object *obj);
  */
 void kvm_arm_steal_time_finalize(ARMCPU *cpu, Error **errp);
 
-/**
- * kvm_arm_steal_time_supported:
- *
- * Returns: true if KVM can enable steal time reporting
- * and false otherwise.
- */
-bool kvm_arm_steal_time_supported(void);
-
 /**
  * kvm_arm_aarch32_supported:
  *
@@ -374,11 +366,6 @@  static inline bool kvm_arm_sve_supported(void)
     return false;
 }
 
-static inline bool kvm_arm_steal_time_supported(void)
-{
-    return false;
-}
-
 /*
  * These functions should never actually be called without KVM support.
  */
diff --git a/target/arm/kvm64.c b/target/arm/kvm64.c
index 6b6db9374c..fca4864b73 100644
--- a/target/arm/kvm64.c
+++ b/target/arm/kvm64.c
@@ -399,7 +399,7 @@  bool kvm_arm_get_host_cpu_features(ARMHostCPUFeatures *ahcf)
 
 void kvm_arm_steal_time_finalize(ARMCPU *cpu, Error **errp)
 {
-    bool has_steal_time = kvm_arm_steal_time_supported();
+    bool has_steal_time = kvm_check_extension(kvm_state, KVM_CAP_STEAL_TIME);
 
     if (cpu->kvm_steal_time == ON_OFF_AUTO_AUTO) {
         if (!has_steal_time || !arm_feature(&cpu->env, ARM_FEATURE_AARCH64)) {
@@ -437,11 +437,6 @@  bool kvm_arm_sve_supported(void)
     return kvm_check_extension(kvm_state, KVM_CAP_ARM_SVE);
 }
 
-bool kvm_arm_steal_time_supported(void)
-{
-    return kvm_check_extension(kvm_state, KVM_CAP_STEAL_TIME);
-}
-
 QEMU_BUILD_BUG_ON(KVM_ARM64_SVE_VQ_MIN != 1);
 
 uint32_t kvm_arm_sve_get_vls(CPUState *cs)