target/arm: Drop kvm_arm_sve_supported
This function has only one real 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-7-richard.henderson@linaro.org Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Richard Henderson committed
Feb 26, 2026 at 11:27 UTC
4d08afde4b6245c3ecf8c5142df341f9823f00a9
3 files changed
+1
-25
target/arm/kvm-stub.c
-5
@@ -37,11 +37,6 @@ bool kvm_arm_pmu_supported(void)
37
return false;
38
}
39
40
-bool kvm_arm_sve_supported(void)
41
-{
42
- return false;
43
-}
44
-
40
bool kvm_arm_mte_supported(void)
41
{
42
return false;
target/arm/kvm.c
+1
-8
@@ -246,7 +246,6 @@ static int get_host_cpu_reg(int fd, ARMHostCPUFeatures *ahcf,
246
247
static uint32_t kvm_arm_sve_get_vls(int fd)
248
{
249
- /* Only call this function if kvm_arm_sve_supported() returns true. */
249
uint64_t vls[KVM_ARM64_SVE_VLS_WORDS];
250
struct kvm_one_reg reg = {
251
.id = KVM_REG_ARM64_SVE_VLS,
@@ -298,7 +297,7 @@ static bool kvm_arm_get_host_cpu_features(ARMHostCPUFeatures *ahcf)
297
* Ask for SVE if supported, so that we can query ID_AA64ZFR0,
298
* which is otherwise RAZ.
299
*/
301
- sve_supported = kvm_arm_sve_supported();
300
+ sve_supported = kvm_check_extension(kvm_state, KVM_CAP_ARM_SVE);
301
if (sve_supported) {
302
init.features[0] |= 1 << KVM_ARM_VCPU_SVE;
303
}
@@ -1937,11 +1936,6 @@ bool kvm_arm_el2_supported(void)
1936
return kvm_check_extension(kvm_state, KVM_CAP_ARM_EL2);
1937
}
1938
1940
-bool kvm_arm_sve_supported(void)
1941
-{
1942
- return kvm_check_extension(kvm_state, KVM_CAP_ARM_SVE);
1943
-}
1944
-
1939
bool kvm_arm_mte_supported(void)
1940
{
1941
return kvm_check_extension(kvm_state, KVM_CAP_ARM_MTE);
@@ -2000,7 +1994,6 @@ int kvm_arch_init_vcpu(CPUState *cs)
1994
cpu->kvm_init_features[0] |= 1 << KVM_ARM_VCPU_PMU_V3;
1995
}
1996
if (cpu_isar_feature(aa64_sve, cpu)) {
2003
- assert(kvm_arm_sve_supported());
1997
cpu->kvm_init_features[0] |= 1 << KVM_ARM_VCPU_SVE;
1998
}
1999
if (cpu_isar_feature(aa64_pauth, cpu)) {
target/arm/kvm_arm.h
-12
@@ -176,13 +176,6 @@ bool kvm_arm_aarch32_supported(void);
176
*/
177
bool kvm_arm_pmu_supported(void);
178
179
-/**
180
- * kvm_arm_sve_supported:
181
- *
182
- * Returns true if KVM can enable SVE and false otherwise.
183
- */
184
-bool kvm_arm_sve_supported(void);
185
-
179
/**
180
* kvm_arm_mte_supported:
181
*
@@ -208,11 +201,6 @@ static inline bool kvm_arm_pmu_supported(void)
201
return false;
202
}
203
211
-static inline bool kvm_arm_sve_supported(void)
212
-{
213
- return false;
214
-}
215
-
204
static inline bool kvm_arm_mte_supported(void)
205
{
206
return false;