Signed-off-by: Jan Kiszka <jan.kiszka@xxxxxxxxxxx> --- cpus.c | 9 ++------- sysemu.h | 1 + vl.c | 2 +- 3 files changed, 4 insertions(+), 8 deletions(-) diff --git a/cpus.c b/cpus.c index 0455481..23c6ccd 100644 --- a/cpus.c +++ b/cpus.c @@ -1193,8 +1193,6 @@ void list_cpus(FILE *f, fprintf_function cpu_fprintf, const char *optarg) #include <sys/syscall.h> -static CPUState *kvm_debug_cpu_requested; - unsigned long kvm_get_thread_id(void) { return syscall(SYS_gettid); @@ -1294,8 +1292,7 @@ static int kvm_main_loop_cpu(CPUState *env) case EXCP_HLT: break; case EXCP_DEBUG: - kvm_debug_cpu_requested = env; - env->stopped = 1; + cpu_handle_guest_debug(env); break; default: timeout = 0; @@ -1391,10 +1388,8 @@ int kvm_main_loop(void) qemu_irq_raise(qemu_system_powerdown); } else if (qemu_reset_requested()) { qemu_kvm_system_reset(); - } else if (kvm_debug_cpu_requested) { - gdb_set_stop_cpu(kvm_debug_cpu_requested); + } else if (qemu_debug_requested()) { vm_stop(VMSTOP_DEBUG); - kvm_debug_cpu_requested = NULL; } if ((r = qemu_vmstop_requested())) { vm_stop(r); diff --git a/sysemu.h b/sysemu.h index 5cacb9e..0d4f923 100644 --- a/sysemu.h +++ b/sysemu.h @@ -48,6 +48,7 @@ int qemu_reset_requested_get(void); int qemu_shutdown_requested(void); int qemu_reset_requested(void); int qemu_powerdown_requested(void); +int qemu_debug_requested(void); int qemu_vmstop_requested(void); void qemu_system_killed(int signal, pid_t pid); void qemu_kill_report(void); diff --git a/vl.c b/vl.c index 6b5877b..e17094a 100644 --- a/vl.c +++ b/vl.c @@ -1218,7 +1218,7 @@ int qemu_powerdown_requested(void) return r; } -static int qemu_debug_requested(void) +int qemu_debug_requested(void) { int r = debug_requested; debug_requested = 0; -- 1.7.1 -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html