From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MoLQr-00065e-Dm for qemu-devel@nongnu.org; Thu, 17 Sep 2009 14:10:13 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MoLQn-00064Z-Ut for qemu-devel@nongnu.org; Thu, 17 Sep 2009 14:10:13 -0400 Received: from [199.232.76.173] (port=47365 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MoLQn-00064V-O0 for qemu-devel@nongnu.org; Thu, 17 Sep 2009 14:10:09 -0400 Received: from goliath.siemens.de ([192.35.17.28]:18097) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MoLQn-0001jc-1Q for qemu-devel@nongnu.org; Thu, 17 Sep 2009 14:10:09 -0400 Message-ID: <4AB27B7E.6030208@siemens.com> Date: Thu, 17 Sep 2009 20:10:06 +0200 From: Jan Kiszka MIME-Version: 1.0 References: <1252680092-5208-1-git-send-email-glommer@redhat.com> In-Reply-To: <1252680092-5208-1-git-send-email-glommer@redhat.com> Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] [RESEND][PATCH] temporary fix for on_vcpu List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Anthony Liguori Cc: Glauber Costa , qemu-devel@nongnu.org From: Glauber Costa 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 Signed-off-by: Jan Kiszka --- kvm-all.c | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/kvm-all.c b/kvm-all.c index ac57984..3c37dd7 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,