From patchwork Thu Apr 1 18:37:39 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Blue Swirl X-Patchwork-Id: 49234 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 129D5B7D0E for ; Fri, 2 Apr 2010 05:51:51 +1100 (EST) Received: from localhost ([127.0.0.1]:57232 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NxPIQ-0006Qs-W2 for incoming@patchwork.ozlabs.org; Thu, 01 Apr 2010 14:39:15 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NxPH3-0006Py-Pr for qemu-devel@nongnu.org; Thu, 01 Apr 2010 14:37:49 -0400 Received: from [140.186.70.92] (port=36446 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NxPH0-0006PK-Qp for qemu-devel@nongnu.org; Thu, 01 Apr 2010 14:37:49 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1NxPGu-000171-7p for qemu-devel@nongnu.org; Thu, 01 Apr 2010 14:37:41 -0400 Received: from mail-pw0-f45.google.com ([209.85.160.45]:54632) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NxPGt-00016w-VR for qemu-devel@nongnu.org; Thu, 01 Apr 2010 14:37:40 -0400 Received: by pwi6 with SMTP id 6so1258546pwi.4 for ; Thu, 01 Apr 2010 11:37:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:received:message-id:subject:from:to:cc:content-type; bh=k6sWN81kPUSjtn1AtDsUcMovkczhlciaWoR7JtEuZrI=; b=jK+2RJjILWxZxlq281/jS3TVTeJkuZM1B0DlNUPBC8s5V4bbveuY8LlEF6tlD6LGCP TctIyuVzL8yfettycZSgdvSzxn4Em31PhwRsLDLLPY7/RgWAiqXr8x6lPFL8nfneOEHv 2qwXf1osGZKe13B1/POcp4V0ht3R+y9tyAXb0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=gsjXAT/Jgkv/Sg6/ubZZdFohmAsHQJciuTpYTgLVRYjhLVNvEHg2zEolYEsGmsWpIf 2BH5moJrymVZQy+y90uFTY2N9JStWbp6PDhUhJ5F5KuWE7N6XoOEfpxUAdtufrPaGLT8 OK6s2UbhIMFNrDV3L7SVxiJ7SmwXNzWEvYmD0= MIME-Version: 1.0 Received: by 10.140.178.12 with HTTP; Thu, 1 Apr 2010 11:37:39 -0700 (PDT) In-Reply-To: <4BB45D30.7070301@bandsman.co.uk> References: <201004010822.o318MTTm008165@bandsman.co.uk> <4BB45D30.7070301@bandsman.co.uk> Date: Thu, 1 Apr 2010 21:37:39 +0300 Received: by 10.140.58.7 with SMTP id g7mr920667rva.37.1270147059050; Thu, 01 Apr 2010 11:37:39 -0700 (PDT) Message-ID: Subject: Re: [Qemu-devel] Re: Build failure of Git HEAD From: Blue Swirl To: Nigel Horne X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) Cc: qemu-devel@nongnu.org X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org On 4/1/10, Nigel Horne wrote: > > > > just for the record: a build of QEMU from HEAD with > > '--enable-io-thread' fails. In "vl.c" "qemu_system_ready" is used but > > not declared any longer. > > > > > I noticed this yesterday evening. The thing is that qemu_system_ready is > defined in cpus.c, but it's a static variable. The attached patch fixes build. But I don't know if moving qemu_system_ready = 1; qemu_cond_broadcast(); a bit earlier is safe. From 7c54fa959cdece6dc3fe8a3cabac5a783e4f1094 Mon Sep 17 00:00:00 2001 From: Blue Swirl Date: Thu, 1 Apr 2010 18:33:23 +0000 Subject: [PATCH] Fix build when configured with --enable-io-thread Signed-off-by: Blue Swirl --- cpus.c | 9 +++++++++ cpus.h | 1 + vl.c | 13 +------------ 3 files changed, 11 insertions(+), 12 deletions(-) diff --git a/cpus.c b/cpus.c index a2e0642..09f3ebe 100644 --- a/cpus.c +++ b/cpus.c @@ -33,6 +33,12 @@ #include "cpus.h" +#ifdef SIGRTMIN +#define SIG_IPI (SIGRTMIN+4) +#else +#define SIG_IPI SIGUSR1 +#endif + static CPUState *cur_cpu; static CPUState *next_cpu; @@ -305,6 +311,9 @@ int qemu_init_main_loop(void) { int ret; + qemu_system_ready = 1; + qemu_cond_broadcast(&qemu_system_cond); + ret = qemu_event_init(); if (ret) return ret; diff --git a/cpus.h b/cpus.h index 67c9a3b..e72084b 100644 --- a/cpus.h +++ b/cpus.h @@ -10,6 +10,7 @@ void pause_all_vcpus(void); extern int smp_cores; extern int smp_threads; extern int debug_requested; +extern int vmstop_requested; void vm_state_notify(int running, int reason); bool tcg_cpu_exec(void); void set_numa_modes(void); diff --git a/vl.c b/vl.c index 6768cf1..03fccbf 100644 --- a/vl.c +++ b/vl.c @@ -245,12 +245,6 @@ int kvm_allowed = 0; uint32_t xen_domid; enum xen_mode xen_mode = XEN_EMULATE; -#ifdef SIGRTMIN -#define SIG_IPI (SIGRTMIN+4) -#else -#define SIG_IPI SIGUSR1 -#endif - static int default_serial = 1; static int default_parallel = 1; static int default_virtcon = 1; @@ -1781,7 +1775,7 @@ static int reset_requested; static int shutdown_requested; static int powerdown_requested; int debug_requested; -static int vmstop_requested; +int vmstop_requested; int qemu_shutdown_requested(void) { @@ -2019,11 +2013,6 @@ static void main_loop(void) { int r; -#ifdef CONFIG_IOTHREAD - qemu_system_ready = 1; - qemu_cond_broadcast(&qemu_system_cond); -#endif - for (;;) { do { bool nonblocking = false; -- 1.5.6.5