[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 36/43] target/arm/kvm: Have kvm_arm_handle_debug take a ARMCPU arg
From: |
Peter Maydell |
Subject: |
[PULL 36/43] target/arm/kvm: Have kvm_arm_handle_debug take a ARMCPU argument |
Date: |
Tue, 19 Dec 2023 19:13:00 +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-16-philmd@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
target/arm/kvm.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/target/arm/kvm.c b/target/arm/kvm.c
index 075487e62f1..6794dc8ad61 100644
--- a/target/arm/kvm.c
+++ b/target/arm/kvm.c
@@ -1342,7 +1342,7 @@ static int kvm_arm_handle_dabt_nisv(ARMCPU *cpu, uint64_t
esr_iss,
/**
* kvm_arm_handle_debug:
- * @cs: CPUState
+ * @cpu: ARMCPU
* @debug_exit: debug part of the KVM exit structure
*
* Returns: TRUE if the debug exception was handled.
@@ -1353,11 +1353,11 @@ static int kvm_arm_handle_dabt_nisv(ARMCPU *cpu,
uint64_t esr_iss,
* ABI just provides user-space with the full exception syndrome
* register value to be decoded in QEMU.
*/
-static bool kvm_arm_handle_debug(CPUState *cs,
+static bool kvm_arm_handle_debug(ARMCPU *cpu,
struct kvm_debug_exit_arch *debug_exit)
{
int hsr_ec = syn_get_ec(debug_exit->hsr);
- ARMCPU *cpu = ARM_CPU(cs);
+ CPUState *cs = CPU(cpu);
CPUARMState *env = &cpu->env;
/* Ensure PC is synchronised */
@@ -1424,7 +1424,7 @@ int kvm_arch_handle_exit(CPUState *cs, struct kvm_run
*run)
switch (run->exit_reason) {
case KVM_EXIT_DEBUG:
- if (kvm_arm_handle_debug(cs, &run->debug.arch)) {
+ if (kvm_arm_handle_debug(cpu, &run->debug.arch)) {
ret = EXCP_DEBUG;
} /* otherwise return to guest */
break;
--
2.34.1
- [PULL 19/43] target/arm/kvm: Unexport kvm_{get,put}_vcpu_events, (continued)
- [PULL 19/43] target/arm/kvm: Unexport kvm_{get,put}_vcpu_events, Peter Maydell, 2023/12/19
- [PULL 23/43] target/arm/kvm: Remove unused includes, Peter Maydell, 2023/12/19
- [PULL 17/43] target/arm/kvm: Unexport kvm_arm_init_cpreg_list, Peter Maydell, 2023/12/19
- [PULL 20/43] target/arm/kvm: Unexport and tidy kvm_arm_sync_mpstate_to_{kvm, qemu}, Peter Maydell, 2023/12/19
- [PULL 18/43] target/arm/kvm: Init cap_has_inject_serror_esr in kvm_arch_init, Peter Maydell, 2023/12/19
- [PULL 27/43] target/arm/kvm: Have kvm_arm_set_device_attr take a ARMCPU argument, Peter Maydell, 2023/12/19
- [PULL 16/43] target/arm/kvm: Unexport kvm_arm_vcpu_finalize, Peter Maydell, 2023/12/19
- [PULL 14/43] target/arm/kvm: Merge kvm64.c into kvm.c, Peter Maydell, 2023/12/19
- [PULL 24/43] target/arm/kvm: Have kvm_arm_add_vcpu_properties take a ARMCPU argument, Peter Maydell, 2023/12/19
- [PULL 33/43] target/arm/kvm: Have kvm_arm_[get|put]_virtual_time take ARMCPU argument, Peter Maydell, 2023/12/19
- [PULL 36/43] target/arm/kvm: Have kvm_arm_handle_debug take a ARMCPU argument,
Peter Maydell <=
- [PULL 37/43] target/arm/kvm: Have kvm_arm_hw_debug_active take a ARMCPU argument, Peter Maydell, 2023/12/19
- [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