summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorAlex Bennée2022-09-29 13:42:25 +0200
committerAlex Bennée2022-10-06 12:53:41 +0200
commita48e7d9e52f8fe8b47f4c74f3e99d9d677b87fe5 (patch)
tree0cd888467fa5a777b02d75ee831895d2473b5e31 /include
parentgdbstub: move breakpoint logic to accel ops (diff)
downloadqemu-a48e7d9e52f8fe8b47f4c74f3e99d9d677b87fe5.tar.gz
qemu-a48e7d9e52f8fe8b47f4c74f3e99d9d677b87fe5.tar.xz
qemu-a48e7d9e52f8fe8b47f4c74f3e99d9d677b87fe5.zip
gdbstub: move guest debug support check to ops
This removes the final hard coding of kvm_enabled() in gdbstub and moves the check to an AccelOps. Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Mads Ynddal <mads@ynddal.dk> Message-Id: <20220929114231.583801-46-alex.bennee@linaro.org>
Diffstat (limited to 'include')
-rw-r--r--include/sysemu/accel-ops.h1
-rw-r--r--include/sysemu/kvm.h7
2 files changed, 1 insertions, 7 deletions
diff --git a/include/sysemu/accel-ops.h b/include/sysemu/accel-ops.h
index 86794ac273..8cc7996def 100644
--- a/include/sysemu/accel-ops.h
+++ b/include/sysemu/accel-ops.h
@@ -47,6 +47,7 @@ struct AccelOpsClass {
int64_t (*get_elapsed_ticks)(void);
/* gdbstub hooks */
+ bool (*supports_guest_debug)(void);
int (*insert_breakpoint)(CPUState *cpu, int type, hwaddr addr, hwaddr len);
int (*remove_breakpoint)(CPUState *cpu, int type, hwaddr addr, hwaddr len);
void (*remove_all_breakpoints)(CPUState *cpu);
diff --git a/include/sysemu/kvm.h b/include/sysemu/kvm.h
index 21d3f1d01e..6e1bd01725 100644
--- a/include/sysemu/kvm.h
+++ b/include/sysemu/kvm.h
@@ -46,7 +46,6 @@ extern bool kvm_readonly_mem_allowed;
extern bool kvm_direct_msi_allowed;
extern bool kvm_ioeventfd_any_length_allowed;
extern bool kvm_msi_use_devid;
-extern bool kvm_has_guest_debug;
#define kvm_enabled() (kvm_allowed)
/**
@@ -168,11 +167,6 @@ extern bool kvm_has_guest_debug;
*/
#define kvm_msi_devid_required() (kvm_msi_use_devid)
-/*
- * Does KVM support guest debugging
- */
-#define kvm_supports_guest_debug() (kvm_has_guest_debug)
-
#else
#define kvm_enabled() (0)
@@ -190,7 +184,6 @@ extern bool kvm_has_guest_debug;
#define kvm_direct_msi_enabled() (false)
#define kvm_ioeventfd_any_length_enabled() (false)
#define kvm_msi_devid_required() (false)
-#define kvm_supports_guest_debug() (false)
#endif /* CONFIG_KVM_IS_POSSIBLE */