diff options
author | 2009-09-17 19:53:57 +0200 | |
---|---|---|
committer | 2009-09-18 13:04:42 -0300 | |
commit | 190261e2788160fd7fd063ccb487120f46732c1e (patch) | |
tree | 293d3f8d632e41bc9fa829cf02bc247e51414c16 /qemu-kvm.c | |
parent | gdbstub: x86: Switch 64/32 bit registers dynamically (diff) | |
download | qemu-kvm-190261e2788160fd7fd063ccb487120f46732c1e.tar.gz qemu-kvm-190261e2788160fd7fd063ccb487120f46732c1e.tar.bz2 qemu-kvm-190261e2788160fd7fd063ccb487120f46732c1e.zip |
qemu-kvm: Fix guest single-stepping
Hopefully the last regression of 4c0960c0: KVM_SET_GUEST_DEBUG requires
properly synchronized guest registers (on x86: eflags) on entry.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Diffstat (limited to 'qemu-kvm.c')
-rw-r--r-- | qemu-kvm.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/qemu-kvm.c b/qemu-kvm.c index bff11e8fd..6ca3b0f61 100644 --- a/qemu-kvm.c +++ b/qemu-kvm.c @@ -2282,6 +2282,10 @@ static void kvm_invoke_set_guest_debug(void *data) { struct kvm_set_guest_debug_data *dbg_data = data; + if (cpu_single_env->kvm_cpu_state.regs_modified) { + kvm_arch_put_registers(cpu_single_env); + cpu_single_env->kvm_cpu_state.regs_modified = 0; + } dbg_data->err = kvm_set_guest_debug(cpu_single_env->kvm_cpu_state.vcpu_ctx, &dbg_data->dbg); |