Skip to content

Commit

Permalink
target/arm/kvm: Have kvm_arm_hw_debug_active take a ARMCPU argument
Browse files Browse the repository at this point in the history
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-17-philmd@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
  • Loading branch information
philmd authored and pm215 committed Dec 19, 2023
1 parent 3963927 commit 366bf10
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions target/arm/kvm.c
Original file line number Diff line number Diff line change
Expand Up @@ -1453,11 +1453,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));
}
Expand Down Expand Up @@ -1491,7 +1491,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);
}
Expand Down

0 comments on commit 366bf10

Please sign in to comment.