diff options
author | Alex Bennée | 2022-09-29 13:42:24 +0200 |
---|---|---|
committer | Alex Bennée | 2022-10-06 12:53:41 +0200 |
commit | ae7467b1ac49e10c548099e9f9c59af895af2d3f (patch) | |
tree | a414196a412f105a8787c88230bc6b5f749eb2a3 /accel/kvm/kvm-accel-ops.c | |
parent | gdbstub: move sstep flags probing into AccelClass (diff) | |
download | qemu-ae7467b1ac49e10c548099e9f9c59af895af2d3f.tar.gz qemu-ae7467b1ac49e10c548099e9f9c59af895af2d3f.tar.xz qemu-ae7467b1ac49e10c548099e9f9c59af895af2d3f.zip |
gdbstub: move breakpoint logic to accel ops
As HW virtualization requires specific support to handle breakpoints
lets push out special casing out of the core gdbstub code and into
AccelOpsClass. This will make it easier to add other accelerator
support and reduces some of the stub shenanigans.
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Mads Ynddal <mads@ynddal.dk>
Message-Id: <20220929114231.583801-45-alex.bennee@linaro.org>
Diffstat (limited to 'accel/kvm/kvm-accel-ops.c')
-rw-r--r-- | accel/kvm/kvm-accel-ops.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/accel/kvm/kvm-accel-ops.c b/accel/kvm/kvm-accel-ops.c index c4244a23c6..5c0e37514c 100644 --- a/accel/kvm/kvm-accel-ops.c +++ b/accel/kvm/kvm-accel-ops.c @@ -16,12 +16,14 @@ #include "qemu/osdep.h" #include "qemu/error-report.h" #include "qemu/main-loop.h" +#include "sysemu/kvm.h" #include "sysemu/kvm_int.h" #include "sysemu/runstate.h" #include "sysemu/cpus.h" #include "qemu/guest-random.h" #include "qapi/error.h" +#include <linux/kvm.h> #include "kvm-cpus.h" static void *kvm_vcpu_thread_fn(void *arg) @@ -95,6 +97,12 @@ static void kvm_accel_ops_class_init(ObjectClass *oc, void *data) ops->synchronize_post_init = kvm_cpu_synchronize_post_init; ops->synchronize_state = kvm_cpu_synchronize_state; ops->synchronize_pre_loadvm = kvm_cpu_synchronize_pre_loadvm; + +#ifdef KVM_CAP_SET_GUEST_DEBUG + ops->insert_breakpoint = kvm_insert_breakpoint; + ops->remove_breakpoint = kvm_remove_breakpoint; + ops->remove_all_breakpoints = kvm_remove_all_breakpoints; +#endif } static const TypeInfo kvm_accel_ops_type = { |