From patchwork Wed Sep 21 17:32:27 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Konrad Rzeszutek Wilk X-Patchwork-Id: 9344023 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 0120660B16 for ; Wed, 21 Sep 2016 17:35:48 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E2B802A83D for ; Wed, 21 Sep 2016 17:35:47 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D744F2A84A; Wed, 21 Sep 2016 17:35:47 +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, UNPARSEABLE_RELAY 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 0E83A2A846 for ; Wed, 21 Sep 2016 17:35:47 +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 1bmlOU-0003r1-GI; Wed, 21 Sep 2016 17:33:14 +0000 Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bmlOS-0003oT-LI for xen-devel@lists.xenproject.org; Wed, 21 Sep 2016 17:33:12 +0000 Received: from [85.158.137.68] by server-11.bemta-3.messagelabs.com id 30/E2-11394-754C2E75; Wed, 21 Sep 2016 17:33:11 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrDLMWRWlGSWpSXmKPExsXSO6nOVTf8yKN wg+M7hC2+b5nM5MDocfjDFZYAxijWzLyk/IoE1oyehrPMBc9tKp6/amFuYLxh3MXIxSEkMJFJ YvL2TYwQzl9GiSvfb7NAOBsZJc5vmMAO4cxilFg6bTpQGQcHm4CJxJtVjiBxEYE+RomNV3+zd TFycjCDOPtOM4PYwgIREgumdjGC2CwCqhKXJ59kAbF5BdwlPmyYyAoyR0JAXuLZ7XqQMCdQ+M 6jI2CtQgJuEnf7H7KC2BIChhKfNy5lnsDIt4CRYRWjRnFqUVlqka6RqV5SUWZ6RkluYmaOrqG BsV5uanFxYnpqTmJSsV5yfu4mRmCo1DMwMO5gbD3hd4hRkoNJSZS3e8ujcCG+pPyUyozE4oz4 otKc1OJDjDIcHEoSvDqHgXKCRanpqRVpmTnAoIVJS3DwKInwKoCkeYsLEnOLM9MhUqcYFaXEe d8cAkoIgCQySvPg2mCRcolRVkqYl5GBgUGIpyC1KDezBFX+FaM4B6OSMO9jkCk8mXklcNNfAS 1mAlq85ecDkMUliQgpqQbG0G1WZh8333fncrp/2q9Qy1RybajqF5uCt1ILTbkOTBBQ9GlmY+v IS75Y8mqZ3JmgQzNrHvR/cNu5ceIDXx67+Ue0HhzZ/6H+sfWqDa5Bxx5GvD6m0h0qb3x7+ua1 zzb+eJUUoGd2Y/MPETatpZbMmqzPJlrZv3yTGJ/FtUh/rivPybuXUm2uK7EUZyQaajEXFScCA BShVC+PAgAA X-Env-Sender: konrad.wilk@oracle.com X-Msg-Ref: server-15.tower-31.messagelabs.com!1474479189!58009432!1 X-Originating-IP: [141.146.126.69] X-SpamReason: No, hits=0.0 required=7.0 tests=sa_preprocessor: VHJ1c3RlZCBJUDogMTQxLjE0Ni4xMjYuNjkgPT4gMjc3MjE4\n X-StarScan-Received: X-StarScan-Version: 8.84; banners=-,-,- X-VirusChecked: Checked Received: (qmail 14866 invoked from network); 21 Sep 2016 17:33:10 -0000 Received: from aserp1040.oracle.com (HELO aserp1040.oracle.com) (141.146.126.69) by server-15.tower-31.messagelabs.com with DHE-RSA-AES256-GCM-SHA384 encrypted SMTP; 21 Sep 2016 17:33:10 -0000 Received: from userv0022.oracle.com (userv0022.oracle.com [156.151.31.74]) by aserp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id u8LHX1ak023748 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 21 Sep 2016 17:33:01 GMT Received: from aserv0122.oracle.com (aserv0122.oracle.com [141.146.126.236]) by userv0022.oracle.com (8.14.4/8.13.8) with ESMTP id u8LHX0Il016717 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 21 Sep 2016 17:33:01 GMT Received: from abhmp0012.oracle.com (abhmp0012.oracle.com [141.146.116.18]) by aserv0122.oracle.com (8.14.4/8.14.4) with ESMTP id u8LHX0uv015113; Wed, 21 Sep 2016 17:33:00 GMT Received: from localhost.localdomain.localdomain (/172.58.216.202) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Wed, 21 Sep 2016 10:33:00 -0700 From: Konrad Rzeszutek Wilk To: konrad@kernel.org, xen-devel@lists.xenproject.org, ross.lagerwall@citrix.com, sstabellini@kernel.org, julien.grall@arm.com Date: Wed, 21 Sep 2016 13:32:27 -0400 Message-Id: <1474479154-20991-10-git-send-email-konrad.wilk@oracle.com> X-Mailer: git-send-email 2.4.11 In-Reply-To: <1474479154-20991-1-git-send-email-konrad.wilk@oracle.com> References: <1474479154-20991-1-git-send-email-konrad.wilk@oracle.com> X-Source-IP: userv0022.oracle.com [156.151.31.74] Cc: Andrew Cooper , Jan Beulich , Konrad Rzeszutek Wilk Subject: [Xen-devel] [PATCH v5 09/16] livepatch: Move test-cases to their own sub-directory in test. 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: , MIME-Version: 1.0 Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" X-Virus-Scanned: ClamAV using ClamSMTP So they can be shared with ARM64 (but not yet, so they are only built on x86). No functional change. We also need to tweak the MAINTAINERS and .gitignore file. Also we need to update SUBDIRS to include the new 'test' directory so 'cscope' can show the example livepatches. Acked-by: Jan Beulich [for directory] Signed-off-by: Konrad Rzeszutek Wilk Acked-by: Julien Grall Reviewed-by: Ross Lagerwall --- Cc: Stefano Stabellini Cc: Julien Grall Cc: Jan Beulich Cc: Andrew Cooper v1: First submission v2: Move to test/livepatch per Jan's recommendation v3: Sort MAINTAINERS for livepatch. Add Jan's Acked-by. Added on the SUBDIRS the 'test' directory Change title of patch (common-> own sub-directory) --- .gitignore | 8 ++++---- MAINTAINERS | 1 + xen/Makefile | 5 +++-- xen/arch/arm/Makefile | 3 --- xen/arch/x86/Makefile | 5 ----- xen/test/Makefile | 9 +++++++++ xen/{arch/x86/test => test/livepatch}/Makefile | 0 xen/{arch/x86/test => test/livepatch}/xen_bye_world.c | 0 xen/{arch/x86/test => test/livepatch}/xen_bye_world_func.c | 0 xen/{arch/x86/test => test/livepatch}/xen_hello_world.c | 0 xen/{arch/x86/test => test/livepatch}/xen_hello_world_func.c | 0 xen/{arch/x86/test => test/livepatch}/xen_replace_world.c | 0 xen/{arch/x86/test => test/livepatch}/xen_replace_world_func.c | 0 13 files changed, 17 insertions(+), 14 deletions(-) create mode 100644 xen/test/Makefile rename xen/{arch/x86/test => test/livepatch}/Makefile (100%) rename xen/{arch/x86/test => test/livepatch}/xen_bye_world.c (100%) rename xen/{arch/x86/test => test/livepatch}/xen_bye_world_func.c (100%) rename xen/{arch/x86/test => test/livepatch}/xen_hello_world.c (100%) rename xen/{arch/x86/test => test/livepatch}/xen_hello_world_func.c (100%) rename xen/{arch/x86/test => test/livepatch}/xen_replace_world.c (100%) rename xen/{arch/x86/test => test/livepatch}/xen_replace_world_func.c (100%) diff --git a/.gitignore b/.gitignore index cc64fc9..eeabe0b 100644 --- a/.gitignore +++ b/.gitignore @@ -254,10 +254,6 @@ xen/arch/x86/efi.lds xen/arch/x86/efi/check.efi xen/arch/x86/efi/disabled xen/arch/x86/efi/mkreloc -xen/arch/x86/test/config.h -xen/arch/x86/test/xen_hello_world.livepatch -xen/arch/x86/test/xen_bye_world.livepatch -xen/arch/x86/test/xen_replace_world.livepatch xen/arch/*/efi/boot.c xen/arch/*/efi/compat.c xen/arch/*/efi/efi.h @@ -274,6 +270,10 @@ xen/include/public/public xen/include/xen/*.new xen/include/xen/acm_policy.h xen/include/xen/compile.h +xen/test/livepatch/config.h +xen/test/livepatch/xen_bye_world.livepatch +xen/test/livepatch/xen_hello_world.livepatch +xen/test/livepatch/xen_replace_world.livepatch xen/tools/kconfig/.tmp_gtkcheck xen/tools/kconfig/.tmp_qtcheck xen/tools/symbols diff --git a/MAINTAINERS b/MAINTAINERS index 1c39146..8c5b756 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -273,6 +273,7 @@ F: xen/arch/*/*/livepatch* F: xen/common/livepatch* F: xen/include/asm-*/livepatch.h F: xen/include/xen/livepatch* +F: xen/test/livepatch/* MACHINE CHECK (MCA) & RAS M: Christoph Egger diff --git a/xen/Makefile b/xen/Makefile index 012509b..e989a20 100644 --- a/xen/Makefile +++ b/xen/Makefile @@ -80,7 +80,7 @@ _install: $(TARGET)$(CONFIG_XEN_INSTALL_SUFFIX) .PHONY: _tests _tests: - $(MAKE) -f $(BASEDIR)/Rules.mk -C arch/$(TARGET_ARCH) tests + $(MAKE) -f $(BASEDIR)/Rules.mk -C test tests .PHONY: _uninstall _uninstall: D=$(DESTDIR) @@ -114,6 +114,7 @@ _clean: delete-unfresh-files $(MAKE) -f $(BASEDIR)/Rules.mk -C xsm clean $(MAKE) -f $(BASEDIR)/Rules.mk -C crypto clean $(MAKE) -f $(BASEDIR)/Rules.mk -C arch/$(TARGET_ARCH) clean + $(MAKE) -f $(BASEDIR)/Rules.mk -C test clean $(MAKE) -f $(BASEDIR)/tools/kconfig/Makefile.kconfig ARCH=$(ARCH) SRCARCH=$(SRCARCH) clean find . \( -name "*.o" -o -name ".*.d" \) -exec rm -f {} \; rm -f include/asm $(TARGET) $(TARGET).gz $(TARGET).efi $(TARGET).efi.map $(TARGET)-syms $(TARGET)-syms.map *~ core @@ -189,7 +190,7 @@ include/asm-$(TARGET_ARCH)/asm-offsets.h: arch/$(TARGET_ARCH)/asm-offsets.s echo ""; \ echo "#endif") <$< >$@ -SUBDIRS = xsm arch/$(TARGET_ARCH) common drivers +SUBDIRS = xsm arch/$(TARGET_ARCH) common drivers test define all_sources ( find include/asm-$(TARGET_ARCH) -name '*.h' -print; \ find include -name 'asm-*' -prune -o -name '*.h' -print; \ diff --git a/xen/arch/arm/Makefile b/xen/arch/arm/Makefile index 5cee84d..1d9051c 100644 --- a/xen/arch/arm/Makefile +++ b/xen/arch/arm/Makefile @@ -74,9 +74,6 @@ ifeq ($(CONFIG_ARM_64),y) ln -sf $(notdir $@) ../../$(notdir $@).efi endif -.PHONY: tests -tests: - $(TARGET).axf: $(TARGET)-syms # XXX: VE model loads by VMA so instead of # making a proper ELF we link with LMA == VMA and adjust crudely diff --git a/xen/arch/x86/Makefile b/xen/arch/x86/Makefile index d3875c5..931917d 100644 --- a/xen/arch/x86/Makefile +++ b/xen/arch/x86/Makefile @@ -93,10 +93,6 @@ $(TARGET): $(TARGET)-syms $(efi-y) boot/mkelf32 ./boot/mkelf32 $(notes_phdrs) $(TARGET)-syms $(TARGET) 0x100000 \ `$(NM) -nr $(TARGET)-syms | head -n 1 | sed -e 's/^\([^ ]*\).*/0x\1/'` -.PHONY: tests -tests: - $(MAKE) -f $(BASEDIR)/Rules.mk -C test livepatch - ALL_OBJS := $(BASEDIR)/arch/x86/boot/built_in.o $(BASEDIR)/arch/x86/efi/built_in.o $(ALL_OBJS) ifeq ($(lto),y) @@ -226,4 +222,3 @@ clean:: rm -f $(BASEDIR)/.xen.efi.[0-9]* efi/*.o efi/.*.d efi/*.efi efi/disabled efi/mkreloc rm -f boot/reloc.S boot/reloc.lnk boot/reloc.bin rm -f note.o - $(MAKE) -f $(BASEDIR)/Rules.mk -C test clean diff --git a/xen/test/Makefile b/xen/test/Makefile new file mode 100644 index 0000000..8c53040 --- /dev/null +++ b/xen/test/Makefile @@ -0,0 +1,9 @@ +.PHONY: tests +tests: +ifeq ($(XEN_TARGET_ARCH),x86_64) + $(MAKE) -f $(BASEDIR)/Rules.mk -C livepatch livepatch +endif + +.PHONY: clean +clean:: + $(MAKE) -f $(BASEDIR)/Rules.mk -C livepatch clean diff --git a/xen/arch/x86/test/Makefile b/xen/test/livepatch/Makefile similarity index 100% rename from xen/arch/x86/test/Makefile rename to xen/test/livepatch/Makefile diff --git a/xen/arch/x86/test/xen_bye_world.c b/xen/test/livepatch/xen_bye_world.c similarity index 100% rename from xen/arch/x86/test/xen_bye_world.c rename to xen/test/livepatch/xen_bye_world.c diff --git a/xen/arch/x86/test/xen_bye_world_func.c b/xen/test/livepatch/xen_bye_world_func.c similarity index 100% rename from xen/arch/x86/test/xen_bye_world_func.c rename to xen/test/livepatch/xen_bye_world_func.c diff --git a/xen/arch/x86/test/xen_hello_world.c b/xen/test/livepatch/xen_hello_world.c similarity index 100% rename from xen/arch/x86/test/xen_hello_world.c rename to xen/test/livepatch/xen_hello_world.c diff --git a/xen/arch/x86/test/xen_hello_world_func.c b/xen/test/livepatch/xen_hello_world_func.c similarity index 100% rename from xen/arch/x86/test/xen_hello_world_func.c rename to xen/test/livepatch/xen_hello_world_func.c diff --git a/xen/arch/x86/test/xen_replace_world.c b/xen/test/livepatch/xen_replace_world.c similarity index 100% rename from xen/arch/x86/test/xen_replace_world.c rename to xen/test/livepatch/xen_replace_world.c diff --git a/xen/arch/x86/test/xen_replace_world_func.c b/xen/test/livepatch/xen_replace_world_func.c similarity index 100% rename from xen/arch/x86/test/xen_replace_world_func.c rename to xen/test/livepatch/xen_replace_world_func.c