From patchwork Tue May 14 11:17:54 2019 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: 10942709 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 6FCFF912 for ; Tue, 14 May 2019 11:20:32 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5C00B286A1 for ; Tue, 14 May 2019 11:20:32 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4FC42286AA; Tue, 14 May 2019 11:20:32 +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=-5.2 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, 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 AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id CFBC3286A0 for ; Tue, 14 May 2019 11:20:26 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1hQVRo-0000Ds-5e; Tue, 14 May 2019 11:18:16 +0000 Received: from all-amaz-eas1.inumbo.com ([34.197.232.57] helo=us1-amaz-eas2.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1hQVRn-0000Dl-9V for xen-devel@lists.xenproject.org; Tue, 14 May 2019 11:18:15 +0000 X-Inumbo-ID: f4656988-7639-11e9-91ca-777a028e84c0 Received: from SMTP03.CITRIX.COM (unknown [162.221.156.55]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id f4656988-7639-11e9-91ca-777a028e84c0; Tue, 14 May 2019 11:18:10 +0000 (UTC) X-IronPort-AV: E=Sophos;i="5.60,468,1549929600"; d="scan'208";a="85432572" From: Roger Pau Monne To: Date: Tue, 14 May 2019 13:17:54 +0200 Message-ID: <20190514111754.56758-1-roger.pau@citrix.com> X-Mailer: git-send-email 2.17.2 (Apple Git-113) MIME-Version: 1.0 Subject: [Xen-devel] [PATCH] pvshim: make PV shim build selectable from configure X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Wei Liu , Ian Jackson , Roger Pau Monne Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" X-Virus-Scanned: ClamAV using ClamSMTP So a user can decide whether to compile a PV shim as part of the tools build. Note that the default behavior is preserved, which is to build a PV shim when the target architecture is x86. Requested-by: Olaf Hering Signed-off-by: Roger Pau Monné --- NOTE: run autogen.sh after applying. --- Cc: Ian Jackson Cc: Wei Liu --- config/Tools.mk.in | 2 ++ tools/configure.ac | 12 ++++++++++++ tools/firmware/Makefile | 4 ---- 3 files changed, 14 insertions(+), 4 deletions(-) diff --git a/config/Tools.mk.in b/config/Tools.mk.in index 98245f63c9..84ddb1a542 100644 --- a/config/Tools.mk.in +++ b/config/Tools.mk.in @@ -75,3 +75,5 @@ TINFO_LIBS := @TINFO_LIBS@ ARGP_LDFLAGS := @argp_ldflags@ FILE_OFFSET_BITS := @FILE_OFFSET_BITS@ + +CONFIG_PV_SHIM := @pvshim@ diff --git a/tools/configure.ac b/tools/configure.ac index c9fd69ddfa..2d2f657cac 100644 --- a/tools/configure.ac +++ b/tools/configure.ac @@ -492,4 +492,16 @@ AC_ARG_ENABLE([9pfs], AC_SUBST(ninepfs) +AC_ARG_ENABLE([pvshim], + AS_HELP_STRING([--disable-pvshim], + [Disable pvshim build (x86 only, enabled by default)]), + [AS_IF([test "x$enable_pvshim" = "xno"], [pvshim=n], [pvshim=y])], [ + case "$target_cpu" in + i[[3456]]86|x86_64) + pvshim="y";; + *) pvshim="n";; + esac +]) +AC_SUBST(pvshim) + AC_OUTPUT() diff --git a/tools/firmware/Makefile b/tools/firmware/Makefile index cf304fc578..809a5fd025 100644 --- a/tools/firmware/Makefile +++ b/tools/firmware/Makefile @@ -1,10 +1,6 @@ XEN_ROOT = $(CURDIR)/../.. include $(XEN_ROOT)/tools/Rules.mk -ifneq ($(XEN_TARGET_ARCH),x86_32) -CONFIG_PV_SHIM := y -endif - # hvmloader is a 32-bit protected mode binary. TARGET := hvmloader/hvmloader INST_DIR := $(DESTDIR)$(XENFIRMWAREDIR)