diff options
| author | Alex Bennée <alex.bennee@linaro.org> | 2022-09-29 12:42:25 +0100 |
|---|---|---|
| committer | Alex Bennée <alex.bennee@linaro.org> | 2022-10-06 11:53:41 +0100 |
| commit | a48e7d9e52f8fe8b47f4c74f3e99d9d677b87fe5 (patch) | |
| tree | 0cd888467fa5a777b02d75ee831895d2473b5e31 /accel/kvm/kvm-all.c | |
| parent | ae7467b1ac49e10c548099e9f9c59af895af2d3f (diff) | |
| download | focaccia-qemu-a48e7d9e52f8fe8b47f4c74f3e99d9d677b87fe5.tar.gz focaccia-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 'accel/kvm/kvm-all.c')
| -rw-r--r-- | accel/kvm/kvm-all.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/accel/kvm/kvm-all.c b/accel/kvm/kvm-all.c index b8c734fe3a..6ebff6e5a6 100644 --- a/accel/kvm/kvm-all.c +++ b/accel/kvm/kvm-all.c @@ -3287,6 +3287,12 @@ int kvm_update_guest_debug(CPUState *cpu, unsigned long reinject_trap) return data.err; } +bool kvm_supports_guest_debug(void) +{ + /* probed during kvm_init() */ + return kvm_has_guest_debug; +} + int kvm_insert_breakpoint(CPUState *cpu, int type, hwaddr addr, hwaddr len) { struct kvm_sw_breakpoint *bp; |