target/arm: Use kvm_arm_sve_supported in kvm_arm_get_host_cpu_features
authorRichard Henderson <richard.henderson@linaro.org>
Mon, 1 Aug 2022 15:21:17 +0000 (16:21 +0100)
committerPeter Maydell <peter.maydell@linaro.org>
Mon, 1 Aug 2022 15:21:17 +0000 (16:21 +0100)
Indication for support for SVE will not depend on whether we
perform the query on the main kvm_state or the temp vcpu.

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20220726045828.53697-2-richard.henderson@linaro.org
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
target/arm/kvm64.c

index d16d4ea2500b69f3b01d3931ae5c1d745b59ebcb..bb1516b3d5ac4c19233c45c5efd55b56864d957a 100644 (file)
@@ -675,7 +675,7 @@ bool kvm_arm_get_host_cpu_features(ARMHostCPUFeatures *ahcf)
         }
     }
 
-    sve_supported = ioctl(fdarray[0], KVM_CHECK_EXTENSION, KVM_CAP_ARM_SVE) > 0;
+    sve_supported = kvm_arm_sve_supported();
 
     /* Add feature bits that can't appear until after VCPU init. */
     if (sve_supported) {