[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 25/43] target/arm/kvm: Have kvm_arm_sve_set_vls take a ARMCPU argu
From: |
Peter Maydell |
Subject: |
[PULL 25/43] target/arm/kvm: Have kvm_arm_sve_set_vls take a ARMCPU argument |
Date: |
Tue, 19 Dec 2023 19:12:49 +0000 |
From: Philippe Mathieu-Daudé <philmd@linaro.org>
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-5-philmd@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
target/arm/kvm.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/target/arm/kvm.c b/target/arm/kvm.c
index e5a2596890b..e9c6e2e17c1 100644
--- a/target/arm/kvm.c
+++ b/target/arm/kvm.c
@@ -1855,14 +1855,13 @@ uint32_t kvm_arm_sve_get_vls(CPUState *cs)
return vls[0];
}
-static int kvm_arm_sve_set_vls(CPUState *cs)
+static int kvm_arm_sve_set_vls(ARMCPU *cpu)
{
- ARMCPU *cpu = ARM_CPU(cs);
uint64_t vls[KVM_ARM64_SVE_VLS_WORDS] = { cpu->sve_vq.map };
assert(cpu->sve_max_vq <= KVM_ARM64_SVE_VQ_MAX);
- return kvm_set_one_reg(cs, KVM_REG_ARM64_SVE_VLS, &vls[0]);
+ return kvm_set_one_reg(CPU(cpu), KVM_REG_ARM64_SVE_VLS, &vls[0]);
}
#define ARM_CPU_ID_MPIDR 3, 0, 0, 0, 5
@@ -1919,7 +1918,7 @@ int kvm_arch_init_vcpu(CPUState *cs)
}
if (cpu_isar_feature(aa64_sve, cpu)) {
- ret = kvm_arm_sve_set_vls(cs);
+ ret = kvm_arm_sve_set_vls(cpu);
if (ret) {
return ret;
}
--
2.34.1
- [PULL 38/43] target/arm: Don't implement *32_EL2 registers when EL1 is AArch64 only, (continued)
- [PULL 38/43] target/arm: Don't implement *32_EL2 registers when EL1 is AArch64 only, Peter Maydell, 2023/12/19
- [PULL 39/43] target/arm: Restrict TCG specific helpers, Peter Maydell, 2023/12/19
- [PULL 40/43] target/arm: Restrict DC CVAP & DC CVADP instructions to TCG accel, Peter Maydell, 2023/12/19
- [PULL 42/43] target/arm/helper: Propagate MDCR_EL2.HPMN into PMCR_EL0.N, Peter Maydell, 2023/12/19
- [PULL 26/43] target/arm/kvm: Have kvm_arm_sve_get_vls take a ARMCPU argument, Peter Maydell, 2023/12/19
- [PULL 30/43] target/arm/kvm: Have kvm_arm_pmu_set_irq take a ARMCPU argument, Peter Maydell, 2023/12/19
- [PULL 29/43] target/arm/kvm: Have kvm_arm_pmu_init take a ARMCPU argument, Peter Maydell, 2023/12/19
- [PULL 35/43] target/arm/kvm: Have kvm_arm_handle_dabt_nisv take a ARMCPU argument, Peter Maydell, 2023/12/19
- [PULL 41/43] target/arm/tcg: Including missing 'exec/exec-all.h' header, Peter Maydell, 2023/12/19
- [PULL 43/43] fsl-imx: add simple RTC emulation for i.MX6 and i.MX7 boards, Peter Maydell, 2023/12/19
- [PULL 25/43] target/arm/kvm: Have kvm_arm_sve_set_vls take a ARMCPU argument,
Peter Maydell <=
- Re: [PULL 00/43] target-arm queue, Stefan Hajnoczi, 2023/12/20