Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
target/arm/kvm: Inline kvm_arm_steal_time_supported
This function is only used once, and is quite simple.

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Gavin Shan <gshan@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Tested-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
  • Loading branch information
rth7680 authored and pm215 committed Dec 19, 2023
1 parent 4651247 commit 21beccd
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 19 deletions.
7 changes: 1 addition & 6 deletions target/arm/kvm64.c
Expand Up @@ -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)) {
Expand Down Expand Up @@ -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)
Expand Down
13 changes: 0 additions & 13 deletions target/arm/kvm_arm.h
Expand Up @@ -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:
*
Expand Down Expand Up @@ -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.
*/
Expand Down

0 comments on commit 21beccd

Please sign in to comment.