From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:39749) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SCUmI-00017r-Bh for qemu-devel@nongnu.org; Tue, 27 Mar 2012 07:41:36 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SCUmB-0004nR-EK for qemu-devel@nongnu.org; Tue, 27 Mar 2012 07:41:29 -0400 Received: from cantor2.suse.de ([195.135.220.15]:50669 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SCUmB-0004mr-7e for qemu-devel@nongnu.org; Tue, 27 Mar 2012 07:41:23 -0400 Message-ID: <4F71A75E.4050104@suse.de> Date: Tue, 27 Mar 2012 13:41:18 +0200 From: =?ISO-8859-15?Q?Andreas_F=E4rber?= MIME-Version: 1.0 References: <1332606390-3605-1-git-send-email-lee.essen@nowonline.co.uk> <1332606390-3605-2-git-send-email-lee.essen@nowonline.co.uk> In-Reply-To: <1332606390-3605-2-git-send-email-lee.essen@nowonline.co.uk> Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH 2/4] Enable sigbus_reraise for Solaris List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Lee Essen Cc: Blue Swirl , Stefan Hajnoczi , Jan Kiszka , qemu-devel@nongnu.org Am 24.03.2012 17:26, schrieb Lee Essen: > sigbus_reraise is used by the kvm_wait_io_event function and is > needed on both Linux and Solaris. This patch adds CONFIG_SOLARIS > to the current CONFIG_LINUX only ifdef. >=20 > Signed-off-by: Lee Essen > --- > cpus.c | 4 +++- > 1 files changed, 3 insertions(+), 1 deletions(-) >=20 > diff --git a/cpus.c b/cpus.c > index 25ba621..6550f22 100644 > --- a/cpus.c > +++ b/cpus.c > @@ -455,7 +455,7 @@ static void cpu_signal(int sig) > exit_request =3D 1; > } > =20 > -#ifdef CONFIG_LINUX > +#if defined(CONFIG_LINUX) || defined(CONFIG_SOLARIS) As asked elsewhere: Linux was the only KVM platform so far. If sigbus_reraise() is only used in some KVM function like you said, can't this we guarded with #if defined(CONFIG_KVM) or similar so that we don't have to expand this once FreeBSD etc. merge KVM support, i.e. feature-bas= ed? Andreas > static void sigbus_reraise(void) > { > sigset_t set; > @@ -491,7 +491,9 @@ static void qemu_init_sigbus(void) > action.sa_sigaction =3D (void (*)(int, siginfo_t*, void*))sigbus_h= andler; > sigaction(SIGBUS, &action, NULL); > =20 > +#if defined(CONFIG_LINUX) > prctl(PR_MCE_KILL, PR_MCE_KILL_SET, PR_MCE_KILL_EARLY, 0, 0); > +#endif > } > =20 > static void qemu_kvm_eat_signals(CPUArchState *env) --=20 SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 N=FCrnberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imend=F6rffer; HRB 16746 AG N=FCrnbe= rg