[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 03/43] target/arm/kvm: Merge kvm_arm_init_debug into kvm_arch_init
From: |
Peter Maydell |
Subject: |
[PULL 03/43] target/arm/kvm: Merge kvm_arm_init_debug into kvm_arch_init |
Date: |
Tue, 19 Dec 2023 19:12:27 +0000 |
From: Richard Henderson <richard.henderson@linaro.org>
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>
---
target/arm/kvm_arm.h | 8 --------
target/arm/kvm.c | 8 +++++++-
target/arm/kvm64.c | 12 ------------
3 files changed, 7 insertions(+), 21 deletions(-)
diff --git a/target/arm/kvm_arm.h b/target/arm/kvm_arm.h
index 051a0da41c4..fe6d824a52c 100644
--- a/target/arm/kvm_arm.h
+++ b/target/arm/kvm_arm.h
@@ -18,14 +18,6 @@
#define KVM_ARM_VGIC_V2 (1 << 0)
#define KVM_ARM_VGIC_V3 (1 << 1)
-/**
- * kvm_arm_init_debug() - initialize guest debug capabilities
- * @s: KVMState
- *
- * Should be called only once before using guest debug capabilities.
- */
-void kvm_arm_init_debug(KVMState *s);
-
/**
* kvm_arm_vcpu_init:
* @cs: CPUState
diff --git a/target/arm/kvm.c b/target/arm/kvm.c
index 7903e2ddde1..b4836da6b25 100644
--- a/target/arm/kvm.c
+++ b/target/arm/kvm.c
@@ -308,7 +308,13 @@ int kvm_arch_init(MachineState *ms, KVMState *s)
}
}
- kvm_arm_init_debug(s);
+ max_hw_wps = kvm_check_extension(s, KVM_CAP_GUEST_DEBUG_HW_WPS);
+ hw_watchpoints = g_array_sized_new(true, true,
+ sizeof(HWWatchpoint), max_hw_wps);
+
+ max_hw_bps = kvm_check_extension(s, KVM_CAP_GUEST_DEBUG_HW_BPS);
+ hw_breakpoints = g_array_sized_new(true, true,
+ sizeof(HWBreakpoint), max_hw_bps);
return ret;
}
diff --git a/target/arm/kvm64.c b/target/arm/kvm64.c
index b8bb25a1eaa..40f459b7862 100644
--- a/target/arm/kvm64.c
+++ b/target/arm/kvm64.c
@@ -33,18 +33,6 @@
#include "hw/acpi/ghes.h"
-void kvm_arm_init_debug(KVMState *s)
-{
- max_hw_wps = kvm_check_extension(s, KVM_CAP_GUEST_DEBUG_HW_WPS);
- hw_watchpoints = g_array_sized_new(true, true,
- sizeof(HWWatchpoint), max_hw_wps);
-
- max_hw_bps = kvm_check_extension(s, KVM_CAP_GUEST_DEBUG_HW_BPS);
- hw_breakpoints = g_array_sized_new(true, true,
- sizeof(HWBreakpoint), max_hw_bps);
- return;
-}
-
int kvm_arch_insert_hw_breakpoint(vaddr addr, vaddr len, int type)
{
switch (type) {
--
2.34.1
- [PULL 00/43] target-arm queue, Peter Maydell, 2023/12/19
- [PULL 02/43] target/arm: kvm64: remove a redundant KVM_CAP_SET_GUEST_DEBUG probe, Peter Maydell, 2023/12/19
- [PULL 04/43] target/arm/kvm: Move kvm_arm_verify_ext_dabt_pending and unexport, Peter Maydell, 2023/12/19
- [PULL 03/43] target/arm/kvm: Merge kvm_arm_init_debug into kvm_arch_init,
Peter Maydell <=
- [PULL 05/43] target/arm/kvm: Move kvm_arm_copy_hw_debug_data and unexport, Peter Maydell, 2023/12/19
- [PULL 01/43] accel/kvm: Make kvm_has_guest_debug static, Peter Maydell, 2023/12/19
- [PULL 06/43] target/arm/kvm: Move kvm_arm_hw_debug_active and unexport, Peter Maydell, 2023/12/19
- [PULL 09/43] target/arm/kvm: Inline kvm_arm_steal_time_supported, Peter Maydell, 2023/12/19
- [PULL 11/43] target/arm/kvm: Use a switch for kvm_arm_cpreg_level, Peter Maydell, 2023/12/19
- [PULL 13/43] target/arm/kvm: Move kvm_arm_reg_syncs_via_cpreg_list and unexport, Peter Maydell, 2023/12/19
- [PULL 15/43] target/arm/kvm: Unexport kvm_arm_vcpu_init, Peter Maydell, 2023/12/19
- [PULL 08/43] target/arm/kvm: Unexport kvm_arm_{get, put}_virtual_time, Peter Maydell, 2023/12/19
- [PULL 07/43] target/arm/kvm: Move kvm_arm_handle_debug and unexport, Peter Maydell, 2023/12/19
- [PULL 12/43] target/arm/kvm: Move kvm_arm_cpreg_level and unexport, Peter Maydell, 2023/12/19