]> git.proxmox.com Git - qemu.git/blobdiff - exec.c
Guest debugging support for KVM (Jan Kiszka)
[qemu.git] / exec.c
diff --git a/exec.c b/exec.c
index c6490ff0747162eca49ae50994a5bd116c98e26e..6010bc70c1a8e9f5c868005dbee6d92046683bb9 100644 (file)
--- a/exec.c
+++ b/exec.c
@@ -1457,9 +1457,13 @@ void cpu_single_step(CPUState *env, int enabled)
 #if defined(TARGET_HAS_ICE)
     if (env->singlestep_enabled != enabled) {
         env->singlestep_enabled = enabled;
-        /* must flush all the translated code to avoid inconsistancies */
-        /* XXX: only flush what is necessary */
-        tb_flush(env);
+        if (kvm_enabled())
+            kvm_update_guest_debug(env, 0);
+        else {
+            /* must flush all the translated code to avoid inconsistancies */
+            /* XXX: only flush what is necessary */
+            tb_flush(env);
+        }
     }
 #endif
 }