From patchwork Sat Mar 24 16:26:28 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lee Essen X-Patchwork-Id: 148511 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 0FBC0B6EEF for ; Sun, 25 Mar 2012 03:26:57 +1100 (EST) Received: from localhost ([::1]:55128 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SBTnq-0006Fn-OV for incoming@patchwork.ozlabs.org; Sat, 24 Mar 2012 12:26:54 -0400 Received: from eggs.gnu.org ([208.118.235.92]:58105) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SBTnb-0006El-6L for qemu-devel@nongnu.org; Sat, 24 Mar 2012 12:26:43 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SBTnV-0000Xy-AA for qemu-devel@nongnu.org; Sat, 24 Mar 2012 12:26:38 -0400 Received: from 204.146.238.178.in-addr.arpa ([178.238.146.204]:51174 helo=mail.local) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SBTnV-0000Xe-2a for qemu-devel@nongnu.org; Sat, 24 Mar 2012 12:26:33 -0400 Received: from soldev64.local (209.146.238.178.in-addr.arpa [178.238.146.209]) by mail.local (Postfix) with ESMTP id 6F9374E57; Sat, 24 Mar 2012 16:26:30 +0000 (UTC) From: Lee Essen To: qemu-devel@nongnu.org Date: Sat, 24 Mar 2012 16:26:28 +0000 Message-Id: <1332606390-3605-2-git-send-email-lee.essen@nowonline.co.uk> X-Mailer: git-send-email 1.7.6.3 In-Reply-To: <1332606390-3605-1-git-send-email-lee.essen@nowonline.co.uk> References: <1332606390-3605-1-git-send-email-lee.essen@nowonline.co.uk> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 178.238.146.204 Cc: Blue Swirl , =?UTF-8?q?Andreas=20F=C3=A4rber?= Subject: [Qemu-devel] [PATCH 2/4] Enable sigbus_reraise for Solaris X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org 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. Signed-off-by: Lee Essen --- cpus.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) 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 = 1; } -#ifdef CONFIG_LINUX +#if defined(CONFIG_LINUX) || defined(CONFIG_SOLARIS) static void sigbus_reraise(void) { sigset_t set; @@ -491,7 +491,9 @@ static void qemu_init_sigbus(void) action.sa_sigaction = (void (*)(int, siginfo_t*, void*))sigbus_handler; sigaction(SIGBUS, &action, NULL); +#if defined(CONFIG_LINUX) prctl(PR_MCE_KILL, PR_MCE_KILL_SET, PR_MCE_KILL_EARLY, 0, 0); +#endif } static void qemu_kvm_eat_signals(CPUArchState *env)