diff options
author | Richard Henderson <richard.henderson@linaro.org> | 2023-12-19 17:57:39 +0000 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2023-12-19 17:57:39 +0000 |
commit | ec4145f728287e3efdfab834fb1a6c7342fa27f1 (patch) | |
tree | c10535790f629ebf80748c4650fb5d12fc177c14 /target/arm/kvm.c | |
parent | 20c83dc9ed3453c991d034bdaa12d36c3e6ff3e0 (diff) | |
download | qemu-ec4145f728287e3efdfab834fb1a6c7342fa27f1.zip qemu-ec4145f728287e3efdfab834fb1a6c7342fa27f1.tar.gz qemu-ec4145f728287e3efdfab834fb1a6c7342fa27f1.tar.bz2 |
target/arm/kvm: Move kvm_arm_copy_hw_debug_data 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>
Diffstat (limited to 'target/arm/kvm.c')
-rw-r--r-- | target/arm/kvm.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/target/arm/kvm.c b/target/arm/kvm.c index 696bc63..2898e68 100644 --- a/target/arm/kvm.c +++ b/target/arm/kvm.c @@ -1021,6 +1021,30 @@ int kvm_arch_process_async_events(CPUState *cs) return 0; } +/** + * kvm_arm_copy_hw_debug_data: + * @ptr: kvm_guest_debug_arch structure + * + * Copy the architecture specific debug registers into the + * kvm_guest_debug ioctl structure. + */ +static void kvm_arm_copy_hw_debug_data(struct kvm_guest_debug_arch *ptr) +{ + int i; + memset(ptr, 0, sizeof(struct kvm_guest_debug_arch)); + + for (i = 0; i < max_hw_wps; i++) { + HWWatchpoint *wp = get_hw_wp(i); + ptr->dbg_wcr[i] = wp->wcr; + ptr->dbg_wvr[i] = wp->wvr; + } + for (i = 0; i < max_hw_bps; i++) { + HWBreakpoint *bp = get_hw_bp(i); + ptr->dbg_bcr[i] = bp->bcr; + ptr->dbg_bvr[i] = bp->bvr; + } +} + void kvm_arch_update_guest_debug(CPUState *cs, struct kvm_guest_debug *dbg) { if (kvm_sw_breakpoints_active(cs)) { |