On 7/21/23 13:58, Anton Johansson wrote:
Changes the signature of the target-defined functions for
inserting/removing kvm hw breakpoints. The address and length arguments
are now of vaddr type, which both matches the type used internally in
accel/kvm/kvm-all.c and makes the api target-agnostic.
Signed-off-by: Anton Johansson <a...@rev.ng>
---
include/sysemu/kvm.h | 6 ++----
target/arm/kvm64.c | 16 ++++++++--------
target/i386/kvm/kvm.c | 15 +++++++--------
target/ppc/kvm.c | 15 +++++++--------
target/s390x/kvm/kvm.c | 11 +++++------
5 files changed, 29 insertions(+), 34 deletions(-)
diff --git a/include/sysemu/kvm.h b/include/sysemu/kvm.h
index 5670306dbf..19d87b20e8 100644
--- a/include/sysemu/kvm.h
+++ b/include/sysemu/kvm.h
@@ -426,10 +426,8 @@ int kvm_arch_insert_sw_breakpoint(CPUState *cpu,
struct kvm_sw_breakpoint *bp);
int kvm_arch_remove_sw_breakpoint(CPUState *cpu,
struct kvm_sw_breakpoint *bp);
-int kvm_arch_insert_hw_breakpoint(target_ulong addr,
- target_ulong len, int type);
-int kvm_arch_remove_hw_breakpoint(target_ulong addr,
- target_ulong len, int type);
+int kvm_arch_insert_hw_breakpoint(vaddr addr, vaddr len, int type);
+int kvm_arch_remove_hw_breakpoint(vaddr addr, vaddr len, int type);
void kvm_arch_remove_all_hw_breakpoints(void);
void kvm_arch_update_guest_debug(CPUState *cpu, struct kvm_guest_debug *dbg);
diff --git a/target/arm/kvm64.c b/target/arm/kvm64.c
index 94bbd9661f..c0750792cb 100644
--- a/target/arm/kvm64.c
+++ b/target/arm/kvm64.c
@@ -49,32 +49,32 @@ void kvm_arm_init_debug(KVMState *s)
return;
}
-int kvm_arch_insert_hw_breakpoint(target_ulong addr,
- target_ulong len, int type)
+int kvm_arch_insert_hw_breakpoint(vaddr addr, vaddr len, int type)
{
switch (type) {
case GDB_BREAKPOINT_HW:
- return insert_hw_breakpoint(addr);
+ return insert_hw_breakpoint((target_ulong) addr);
No need for the casts.
r~