From: Jan Kiszka <jan.kiszka@siemens.com>
To: Avi Kivity <avi@redhat.com>, Marcelo Tosatti <mtosatti@redhat.com>
Cc: kvm-devel <kvm@vger.kernel.org>
Subject: [PATCH] qemu-kvm: Fix guest single-stepping
Date: Thu, 17 Sep 2009 19:53:57 +0200 [thread overview]
Message-ID: <4AB277B5.5000105@siemens.com> (raw)
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);
next reply other threads:[~2009-09-17 17:54 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-09-17 17:53 Jan Kiszka [this message]
2009-09-18 16:05 ` [PATCH] qemu-kvm: Fix guest single-stepping Marcelo Tosatti
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4AB277B5.5000105@siemens.com \
--to=jan.kiszka@siemens.com \
--cc=avi@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=mtosatti@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.