[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 03/13] accel: Elide kvm_update_guest_debug by checking kvm_suppor
|
From: |
Philippe Mathieu-Daudé |
|
Subject: |
[PATCH 03/13] accel: Elide kvm_update_guest_debug by checking kvm_supports_guest_debug |
|
Date: |
Tue, 8 Feb 2022 16:22:33 +0100 |
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
accel/stubs/kvm-stub.c | 5 -----
cpu.c | 2 +-
2 files changed, 1 insertion(+), 6 deletions(-)
diff --git a/accel/stubs/kvm-stub.c b/accel/stubs/kvm-stub.c
index 7e0fb884b9..924ffbde85 100644
--- a/accel/stubs/kvm-stub.c
+++ b/accel/stubs/kvm-stub.c
@@ -46,11 +46,6 @@ int kvm_has_many_ioeventfds(void)
return 0;
}
-int kvm_update_guest_debug(CPUState *cpu, unsigned long reinject_trap)
-{
- return -ENOSYS;
-}
-
int kvm_insert_breakpoint(CPUState *cpu, target_ulong addr,
target_ulong len, int type)
{
diff --git a/cpu.c b/cpu.c
index 97d42b6b2a..834e2b4cdb 100644
--- a/cpu.c
+++ b/cpu.c
@@ -350,7 +350,7 @@ void cpu_single_step(CPUState *cpu, int enabled)
{
if (cpu->singlestep_enabled != enabled) {
cpu->singlestep_enabled = enabled;
- if (kvm_enabled()) {
+ if (kvm_enabled() && kvm_supports_guest_debug()) {
kvm_update_guest_debug(cpu, 0);
}
trace_breakpoint_singlestep(cpu->cpu_index, enabled);
--
2.34.1
- [PATCH 00/13] exec: Move translation declarations to 'translate-all.h', Philippe Mathieu-Daudé, 2022/02/08
- [PATCH 01/13] meson: Display libfdt as disabled when system emulation is disabled, Philippe Mathieu-Daudé, 2022/02/08
- [PATCH 02/13] exec/cpu_ldst: Include 'cpu.h' to get target_ulong definition, Philippe Mathieu-Daudé, 2022/02/08
- [PATCH 03/13] accel: Elide kvm_update_guest_debug by checking kvm_supports_guest_debug,
Philippe Mathieu-Daudé <=
- [PATCH 04/13] target/i386/cpu: Ensure accelerators set CPU addressble physical bits, Philippe Mathieu-Daudé, 2022/02/08
- [PATCH 06/13] cpu: Add missing 'exec/exec-all.h' and ''exec/exec-all.h'' headers, Philippe Mathieu-Daudé, 2022/02/08
- [PATCH 05/13] target/i386/tcg/sysemu: Include missing 'exec/exec-all.h' header, Philippe Mathieu-Daudé, 2022/02/08
- [PATCH 07/13] cpu: Move common code to cpu-common, Philippe Mathieu-Daudé, 2022/02/08
- [PATCH 08/13] target: Include missing 'cpu.h', Philippe Mathieu-Daudé, 2022/02/08