summaryrefslogtreecommitdiff
path: root/kvm-all.c
diff options
context:
space:
mode:
authorGlauber Costa <glommer@redhat.com>2009-09-17 20:10:06 +0200
committerAnthony Liguori <aliguori@us.ibm.com>2009-10-05 09:32:45 -0500
commit828566bc3314f91575a8a814f6ff21efc7005b14 (patch)
tree596236b1fdfef5d1e2b5cdb6df5e1587ad038cec /kvm-all.c
parentb3807725f6540f9f2f02ce040c85df2f69cba080 (diff)
temporary fix for on_vcpu
Recent changes made on_vcpu hit the abort() path, even with the IO thread disabled. This is because cpu_single_env is no longer set when we call this function. Although the correct fix is a little bit more complicated that that, the recent thread in which I proposed qemu_queue_work (which fixes that, btw), is likely to go on a quite different direction. So for the benefit of those using guest debugging, I'm proposing this simple fix in the interim. Signed-off-by: Glauber Costa <glommer@redhat.com> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'kvm-all.c')
-rw-r--r--kvm-all.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/kvm-all.c b/kvm-all.c
index f50c31c643..5ea0dd8b1e 100644
--- a/kvm-all.c
+++ b/kvm-all.c
@@ -905,11 +905,15 @@ void kvm_setup_guest_memory(void *start, size_t size)
#ifdef KVM_CAP_SET_GUEST_DEBUG
static void on_vcpu(CPUState *env, void (*func)(void *data), void *data)
{
+#ifdef CONFIG_IOTHREAD
if (env == cpu_single_env) {
func(data);
return;
}
abort();
+#else
+ func(data);
+#endif
}
struct kvm_sw_breakpoint *kvm_find_sw_breakpoint(CPUState *env,