[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 26/43] target/arm/kvm: Have kvm_arm_sve_get_vls take a ARMCPU argu
From: |
Peter Maydell |
Subject: |
[PULL 26/43] target/arm/kvm: Have kvm_arm_sve_get_vls take a ARMCPU argument |
Date: |
Tue, 19 Dec 2023 19:12:50 +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-6-philmd@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
target/arm/kvm_arm.h | 6 +++---
target/arm/cpu64.c | 2 +-
target/arm/kvm.c | 2 +-
3 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/target/arm/kvm_arm.h b/target/arm/kvm_arm.h
index 3abbef02601..d6d999b1ff8 100644
--- a/target/arm/kvm_arm.h
+++ b/target/arm/kvm_arm.h
@@ -129,13 +129,13 @@ void kvm_arm_destroy_scratch_host_vcpu(int *fdarray);
/**
* kvm_arm_sve_get_vls:
- * @cs: CPUState
+ * @cpu: ARMCPU
*
* Get all the SVE vector lengths supported by the KVM host, setting
* the bits corresponding to their length in quadwords minus one
* (vq - 1) up to ARM_MAX_VQ. Return the resulting map.
*/
-uint32_t kvm_arm_sve_get_vls(CPUState *cs);
+uint32_t kvm_arm_sve_get_vls(ARMCPU *cpu);
/**
* kvm_arm_set_cpu_features_from_host:
@@ -278,7 +278,7 @@ static inline void kvm_arm_steal_time_finalize(ARMCPU *cpu,
Error **errp)
g_assert_not_reached();
}
-static inline uint32_t kvm_arm_sve_get_vls(CPUState *cs)
+static inline uint32_t kvm_arm_sve_get_vls(ARMCPU *cpu)
{
g_assert_not_reached();
}
diff --git a/target/arm/cpu64.c b/target/arm/cpu64.c
index 1e9c6c85aec..8e30a7993ea 100644
--- a/target/arm/cpu64.c
+++ b/target/arm/cpu64.c
@@ -66,7 +66,7 @@ void arm_cpu_sve_finalize(ARMCPU *cpu, Error **errp)
*/
if (kvm_enabled()) {
if (kvm_arm_sve_supported()) {
- cpu->sve_vq.supported = kvm_arm_sve_get_vls(CPU(cpu));
+ cpu->sve_vq.supported = kvm_arm_sve_get_vls(cpu);
vq_supported = cpu->sve_vq.supported;
} else {
assert(!cpu_isar_feature(aa64_sve, cpu));
diff --git a/target/arm/kvm.c b/target/arm/kvm.c
index e9c6e2e17c1..132a1b47d04 100644
--- a/target/arm/kvm.c
+++ b/target/arm/kvm.c
@@ -1801,7 +1801,7 @@ bool kvm_arm_sve_supported(void)
QEMU_BUILD_BUG_ON(KVM_ARM64_SVE_VQ_MIN != 1);
-uint32_t kvm_arm_sve_get_vls(CPUState *cs)
+uint32_t kvm_arm_sve_get_vls(ARMCPU *cpu)
{
/* Only call this function if kvm_arm_sve_supported() returns true. */
static uint64_t vls[KVM_ARM64_SVE_VLS_WORDS];
--
2.34.1
- [PULL 21/43] target/arm/kvm: Unexport kvm_arm_vm_state_change, (continued)
- [PULL 21/43] target/arm/kvm: Unexport kvm_arm_vm_state_change, Peter Maydell, 2023/12/19
- [PULL 28/43] target/arm/kvm: Have kvm_arm_pvtime_init take a ARMCPU argument, Peter Maydell, 2023/12/19
- [PULL 31/43] target/arm/kvm: Have kvm_arm_vcpu_init take a ARMCPU argument, Peter Maydell, 2023/12/19
- [PULL 32/43] target/arm/kvm: Have kvm_arm_vcpu_finalize take a ARMCPU argument, Peter Maydell, 2023/12/19
- [PULL 34/43] target/arm/kvm: Have kvm_arm_verify_ext_dabt_pending take a ARMCPU arg, Peter Maydell, 2023/12/19
- [PULL 22/43] hw/intc/arm_gicv3: Include missing 'qemu/error-report.h' header, Peter Maydell, 2023/12/19
- [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 <=
- [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, 2023/12/19
- Re: [PULL 00/43] target-arm queue, Stefan Hajnoczi, 2023/12/20