[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH-for-9.0 16/16] target/arm/kvm: Have kvm_arm_hw_debug_active t
From: |
Gavin Shan |
Subject: |
Re: [PATCH-for-9.0 16/16] target/arm/kvm: Have kvm_arm_hw_debug_active take a ARMCPU argument |
Date: |
Mon, 27 Nov 2023 15:36:19 +1100 |
User-agent: |
Mozilla Thunderbird |
Hi Phil,
On 11/24/23 05:35, Philippe Mathieu-Daudé wrote:
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>
---
target/arm/kvm.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
With the following comments addressed:
Reviewed-by: Gavin Shan <gshan@redhat.com>
diff --git a/target/arm/kvm.c b/target/arm/kvm.c
index 1f6da5529f..cbfea689cc 100644
--- a/target/arm/kvm.c
+++ b/target/arm/kvm.c
@@ -1455,11 +1455,11 @@ int kvm_arch_process_async_events(CPUState *cs)
/**
* kvm_arm_hw_debug_active:
- * @cs: CPU State
+ * @cpu: ARMCPU
*
* Return: TRUE if any hardware breakpoints in use.
*/
-static bool kvm_arm_hw_debug_active(CPUState *cs)
+static bool kvm_arm_hw_debug_active(ARMCPU *cpu)
{
return ((cur_hw_wps > 0) || (cur_hw_bps > 0));
}
Either @cs or @cpu isn't dereferenced in kvm_arm_hw_debug_active(). So I guess
the argument can be simply droped?
@@ -1493,7 +1493,7 @@ void kvm_arch_update_guest_debug(CPUState *cs, struct
kvm_guest_debug *dbg)
if (kvm_sw_breakpoints_active(cs)) {
dbg->control |= KVM_GUESTDBG_ENABLE | KVM_GUESTDBG_USE_SW_BP;
}
- if (kvm_arm_hw_debug_active(cs)) {
+ if (kvm_arm_hw_debug_active(ARM_CPU(cs))) {
dbg->control |= KVM_GUESTDBG_ENABLE | KVM_GUESTDBG_USE_HW;
kvm_arm_copy_hw_debug_data(&dbg->arch);
}
Thanks,
Gavin
- Re: [PATCH-for-9.0 11/16] target/arm/kvm: Have kvm_arm_vcpu_finalize take a ARMCPU argument, (continued)
- [PATCH-for-9.0 12/16] target/arm/kvm: Have kvm_arm_[get|put]_virtual_time take ARMCPU argument, Philippe Mathieu-Daudé, 2023/11/23
- [PATCH-for-9.0 14/16] target/arm/kvm: Have kvm_arm_handle_dabt_nisv take a ARMCPU argument, Philippe Mathieu-Daudé, 2023/11/23
- [PATCH-for-9.0 13/16] target/arm/kvm: Have kvm_arm_verify_ext_dabt_pending take a ARMCPU arg, Philippe Mathieu-Daudé, 2023/11/23
- [PATCH-for-9.0 15/16] target/arm/kvm: Have kvm_arm_handle_debug take a ARMCPU argument, Philippe Mathieu-Daudé, 2023/11/23
- [PATCH-for-9.0 16/16] target/arm/kvm: Have kvm_arm_hw_debug_active take a ARMCPU argument, Philippe Mathieu-Daudé, 2023/11/23
- Re: [PATCH-for-9.0 16/16] target/arm/kvm: Have kvm_arm_hw_debug_active take a ARMCPU argument,
Gavin Shan <=
- Re: [PATCH-for-9.0 00/16] target/arm/kvm: Unify kvm_arm_FOO() API, Richard Henderson, 2023/11/26