aboutsummaryrefslogtreecommitdiff
path: root/target/arm/kvm.c
diff options
context:
space:
mode:
authorPhilippe Mathieu-Daudé <philmd@linaro.org>2023-12-19 17:57:46 +0000
committerPeter Maydell <peter.maydell@linaro.org>2023-12-19 17:57:46 +0000
commit0d31a631868876c623fc29875871516db09af33c (patch)
tree7e97005420dbf3a46945fbd744fd951ed037795b /target/arm/kvm.c
parentbbb22d586561c67103a14311662ff7bc877fcbb9 (diff)
downloadqemu-0d31a631868876c623fc29875871516db09af33c.zip
qemu-0d31a631868876c623fc29875871516db09af33c.tar.gz
qemu-0d31a631868876c623fc29875871516db09af33c.tar.bz2
target/arm/kvm: Have kvm_arm_vcpu_finalize take a ARMCPU argument
Unify the "kvm_arm.h" API: All functions related to ARM vCPUs take a ARMCPU* argument. Use the CPU() QOM cast macro When calling the generic vCPU API from "sysemu/kvm.h". Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: Gavin Shan <gshan@redhat.com> Message-id: 20231123183518.64569-12-philmd@linaro.org Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'target/arm/kvm.c')
-rw-r--r--target/arm/kvm.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/target/arm/kvm.c b/target/arm/kvm.c
index 9540d3c..a2370bc 100644
--- a/target/arm/kvm.c
+++ b/target/arm/kvm.c
@@ -82,7 +82,7 @@ static int kvm_arm_vcpu_init(ARMCPU *cpu)
/**
* kvm_arm_vcpu_finalize:
- * @cs: CPUState
+ * @cpu: ARMCPU
* @feature: feature to finalize
*
* Finalizes the configuration of the specified VCPU feature by
@@ -92,9 +92,9 @@ static int kvm_arm_vcpu_init(ARMCPU *cpu)
*
* Returns: 0 if success else < 0 error code
*/
-static int kvm_arm_vcpu_finalize(CPUState *cs, int feature)
+static int kvm_arm_vcpu_finalize(ARMCPU *cpu, int feature)
{
- return kvm_vcpu_ioctl(cs, KVM_ARM_VCPU_FINALIZE, &feature);
+ return kvm_vcpu_ioctl(CPU(cpu), KVM_ARM_VCPU_FINALIZE, &feature);
}
bool kvm_arm_create_scratch_host_vcpu(const uint32_t *cpus_to_try,
@@ -1921,7 +1921,7 @@ int kvm_arch_init_vcpu(CPUState *cs)
if (ret) {
return ret;
}
- ret = kvm_arm_vcpu_finalize(cs, KVM_ARM_VCPU_SVE);
+ ret = kvm_arm_vcpu_finalize(cpu, KVM_ARM_VCPU_SVE);
if (ret) {
return ret;
}