Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
target/arm/kvm: Move kvm_arm_hw_debug_active and unexport
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Gavin Shan <gshan@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Tested-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
  • Loading branch information
rth7680 authored and pm215 committed Dec 19, 2023
1 parent ec4145f commit ea79c59
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 13 deletions.
11 changes: 11 additions & 0 deletions target/arm/kvm.c
Expand Up @@ -1021,6 +1021,17 @@ int kvm_arch_process_async_events(CPUState *cs)
return 0;
}

/**
* kvm_arm_hw_debug_active:
* @cs: CPU State
*
* Return: TRUE if any hardware breakpoints in use.
*/
static bool kvm_arm_hw_debug_active(CPUState *cs)
{
return ((cur_hw_wps > 0) || (cur_hw_bps > 0));
}

/**
* kvm_arm_copy_hw_debug_data:
* @ptr: kvm_guest_debug_arch structure
Expand Down
5 changes: 0 additions & 5 deletions target/arm/kvm64.c
Expand Up @@ -73,11 +73,6 @@ void kvm_arch_remove_all_hw_breakpoints(void)
}
}

bool kvm_arm_hw_debug_active(CPUState *cs)
{
return ((cur_hw_wps > 0) || (cur_hw_bps > 0));
}

static bool kvm_arm_set_device_attr(CPUState *cs, struct kvm_device_attr *attr,
const char *name)
{
Expand Down
8 changes: 0 additions & 8 deletions target/arm/kvm_arm.h
Expand Up @@ -454,12 +454,4 @@ static inline uint32_t kvm_arm_sve_get_vls(CPUState *cs)
*/
bool kvm_arm_handle_debug(CPUState *cs, struct kvm_debug_exit_arch *debug_exit);

/**
* kvm_arm_hw_debug_active:
* @cs: CPU State
*
* Return: TRUE if any hardware breakpoints in use.
*/
bool kvm_arm_hw_debug_active(CPUState *cs);

#endif

0 comments on commit ea79c59

Please sign in to comment.