From patchwork Thu Oct 26 09:19:37 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Roger_Pau_Monn=C3=A9?= X-Patchwork-Id: 10027887 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 805406032C for ; Thu, 26 Oct 2017 09:22:02 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 75BD328BB3 for ; Thu, 26 Oct 2017 09:22:02 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6AADB28D72; Thu, 26 Oct 2017 09:22:02 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id F115128BB3 for ; Thu, 26 Oct 2017 09:22:01 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e7eKX-0006E7-1O; Thu, 26 Oct 2017 09:20:01 +0000 Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e7eKV-0006BY-8Y for xen-devel@lists.xenproject.org; Thu, 26 Oct 2017 09:19:59 +0000 Received: from [85.158.137.68] by server-3.bemta-3.messagelabs.com id D7/29-18968-EB8A1F95; Thu, 26 Oct 2017 09:19:58 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFtrBIsWRWlGSWpSXmKPExsXitHRDpO6+FR8 jDX43slh83zKZyYHR4/CHKywBjFGsmXlJ+RUJrBkHdm1kLrjNVXF2wVWWBsbJnF2MnBwSAv4S r1eeZgax2QR0JC7O3cnWxcjBISKgInF7rwFImFkgROLq1P1sILawQJjE8eaL7CA2i4CqxMP9e 1hAbF4BS4ntB3tZQVolBPQkfmw3BAlzClhJLHvfxgpiCwGVLDy7lhGiXFDi5MwnLBDjNSVat/ 9mh7DlJZq3zmaGqFeU6J/3gG0CI98sJC2zkLTMQtKygJF5FaN6cWpRWWqRrrleUlFmekZJbmJ mjq6hgbFebmpxcWJ6ak5iUrFecn7uJkZgmDEAwQ7Gxu9OhxglOZiURHkZ9nyIFOJLyk+pzEgs zogvKs1JLT7EqMHBIdC7ZvUFRimWvPy8VCUJ3vzlHyOFBItS01Mr0jJzgJEAUyrBwaMkwvsGJ M1bXJCYW5yZDpE6xWjM0XHz7h8mjmczXzcwC4FNkhLnvQVSKgBSmlGaBzcIFqGXGGWlhHkZgc 4U4ilILcrNLEGVf8UozsGoJMx7FGQKT2ZeCdy+V0CnMAGd0qT6AeSUkkSElFQD48JZFn3Nem/ eH+FqS65Ivbrq3OGiZYXCldpqvCEVNupqC3dmMhzb2RfQf+2UlWvTt7MbXfaI7pmsqsoi3LHx d1ZlpUy+UHCIxxymM2dddi9bVzrrXtv7vy8Dzf3bV+7J2Z/R9ez7+cO1f8UfP7LX9N/U5VLz+ /BM8eg1cS8sza7Ofa/uZRc9UYmlOCPRUIu5qDgRAPBGQUjLAgAA X-Env-Sender: prvs=4659c6258=roger.pau@citrix.com X-Msg-Ref: server-11.tower-31.messagelabs.com!1509009584!81177347!5 X-Originating-IP: [66.165.176.89] X-SpamReason: No, hits=0.0 required=7.0 tests=sa_preprocessor: VHJ1c3RlZCBJUDogNjYuMTY1LjE3Ni44OSA9PiAyMDMwMDc=\n, received_headers: No Received headers X-StarScan-Received: X-StarScan-Version: 9.4.45; banners=-,-,- X-VirusChecked: Checked Received: (qmail 28731 invoked from network); 26 Oct 2017 09:19:57 -0000 Received: from smtp.citrix.com (HELO SMTP.CITRIX.COM) (66.165.176.89) by server-11.tower-31.messagelabs.com with RC4-SHA encrypted SMTP; 26 Oct 2017 09:19:57 -0000 X-IronPort-AV: E=Sophos;i="5.43,434,1503360000"; d="scan'208";a="448310686" From: Roger Pau Monne To: Date: Thu, 26 Oct 2017 10:19:37 +0100 Message-ID: <20171026091938.59247-9-roger.pau@citrix.com> X-Mailer: git-send-email 2.13.5 (Apple Git-94) In-Reply-To: <20171026091938.59247-1-roger.pau@citrix.com> References: <20171026091938.59247-1-roger.pau@citrix.com> MIME-Version: 1.0 Cc: Daniel De Graaf , Roger Pau Monne Subject: [Xen-devel] [PATCH for-next 8/9] xsm: add bodge when compiling with llvm coverage support X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" X-Virus-Scanned: ClamAV using ClamSMTP llvm coverage support seems to disable some of the optimizations needed in order to compile xsm, and the end result is that references to __xsm_action_mismatch_detected are left in the object files. Since coverage support cannot be used in production, introduce __xsm_action_mismatch_detected for llvm coverage builds. Signed-off-by: Roger Pau Monné Acked-by: Daniel De Graaf --- Cc: Daniel De Graaf --- xen/include/xsm/dummy.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/xen/include/xsm/dummy.h b/xen/include/xsm/dummy.h index b2cd56cdc5..674dc8ea1b 100644 --- a/xen/include/xsm/dummy.h +++ b/xen/include/xsm/dummy.h @@ -24,8 +24,22 @@ * if references remain at link time. */ #define LINKER_BUG_ON(x) do { if (x) __xsm_action_mismatch_detected(); } while (0) + +#ifdef CONFIG_LLVM_COVERAGE +/* + * LLVM coverage support seems to disable some of the optimizations needed in + * order for XSM to compile. Since coverage should not be used in production + * provide an implementation of __xsm_action_mismatch_detected to satisfy the + * linker. + */ +static void __xsm_action_mismatch_detected(void) +{ + ASSERT_UNREACHABLE(); +} +#else /* DO NOT implement this function; it is supposed to trigger link errors */ void __xsm_action_mismatch_detected(void); +#endif #ifdef CONFIG_XSM