aboutsummaryrefslogtreecommitdiff
path: root/exec.c
diff options
context:
space:
mode:
authoraliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162>2009-03-12 20:12:48 +0000
committeraliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162>2009-03-12 20:12:48 +0000
commite22a25c9361c44995c9241c24df0e1e2c47a56c8 (patch)
tree4bf900c761e36db33146e5527baed9663cf9a785 /exec.c
parentDrop internal bdrv_pread()/bdrv_pwrite() APIs (Avi Kivity) (diff)
downloadqemu-kvm-e22a25c9361c44995c9241c24df0e1e2c47a56c8.tar.gz
qemu-kvm-e22a25c9361c44995c9241c24df0e1e2c47a56c8.tar.bz2
qemu-kvm-e22a25c9361c44995c9241c24df0e1e2c47a56c8.zip
Guest debugging support for KVM (Jan Kiszka)
This is a backport of the guest debugging support for the KVM accelerator that is now part of the KVM tree. It implements the reworked KVM kernel API for guest debugging (KVM_CAP_SET_GUEST_DEBUG) which is not yet part of any mainline kernel but will probably be 2.6.30 stuff. So far supported is x86, but PPC is expected to catch up soon. Core features are: - unlimited soft-breakpoints via code patching - hardware-assisted x86 breakpoints and watchpoints Changes in this version: - use generic hook cpu_synchronize_state to transfer registers between user space and kvm - push kvm_sw_breakpoints into KVMState Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6825 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'exec.c')
-rw-r--r--exec.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/exec.c b/exec.c
index c6490ff07..6010bc70c 100644
--- 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
}