public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] qemu-kvm: Fix guest single-stepping
@ 2009-09-17 17:53 Jan Kiszka
  2009-09-18 16:05 ` Marcelo Tosatti
  0 siblings, 1 reply; 2+ messages in thread
From: Jan Kiszka @ 2009-09-17 17:53 UTC (permalink / raw)
  To: Avi Kivity, Marcelo Tosatti; +Cc: kvm-devel

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>
---

 qemu-kvm.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/qemu-kvm.c b/qemu-kvm.c
index 78eeb6f..569397e 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);

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-09-18 16:18 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-09-17 17:53 [PATCH] qemu-kvm: Fix guest single-stepping Jan Kiszka
2009-09-18 16:05 ` Marcelo Tosatti

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox