From patchwork Mon Jun 13 09:20:25 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 12879229 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id B262CC43334 for ; Mon, 13 Jun 2022 09:22:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=2Uffl/P9ZhTcVwK+oSr712JXpoGI6W7qQ6n6oYQCWgM=; b=hQcYf4jTC3+RPI kh4fYYiVTY/hPzM2wEdTxjs4OZ7bGJgmFoxOHwkLfliEFXW07TRv6VXw2t4nLl/hzBYk3SVLvDxNz eMv3lPgYN3BiP/8OcvXGyqbVQmRqFrRNG/cz2NMV+cQH7KS/H3g7BLY18ftONREO2FyNgUcni3XKy 8oha+ggUfLejpUUGwdJqe43gzLDkEHEfOBxw1uw2ExhmEjCmxl11N3BwoRPyMAIYaenAHB6VzClWq CrsD/8vrXI+ihyJ+sF8/5CxwAbrodjf78+oARUaafzd60NSCgRPt5/QrrOs8RiHSZ89oSBQR5qoFs DHt8p7BNepFiNF/MdFOA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1o0gFy-002VYg-Ic; Mon, 13 Jun 2022 09:21:10 +0000 Received: from conuserg-11.nifty.com ([210.131.2.78]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1o0gFu-002VUy-K5 for linux-arm-kernel@lists.infradead.org; Mon, 13 Jun 2022 09:21:08 +0000 Received: from grover.sesame (133-32-177-133.west.xps.vectant.ne.jp [133.32.177.133]) (authenticated) by conuserg-11.nifty.com with ESMTP id 25D9Kgx7000823; Mon, 13 Jun 2022 18:20:42 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-11.nifty.com 25D9Kgx7000823 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1655112043; bh=sUeQiGOXKyxAl0UcjFY0Rce/KrFiD5fobjE1eCXei3Y=; h=From:To:Cc:Subject:Date:From; b=tg5xx0WFjhtsWOYFCUHrzxlt1EIpxO7a0yE3L3du7kUgVp1E6TLXPi6gpOO04yr2e D7SWOpfowWBJbLp8NGBXeol+tTlojiNCRSaqVW0XzexYzV8LBN19Hu50s+wf82sz6t DGTw6LTVPBmGRZ7SLoQaN3EehFvjTU2fu7QS1L1diREfr7VD9gT9s/1wFAE7wcZ44a rbxJGz2RA2pn8neAKkszhzUo10+z27U6iRV+E9RB1AgKaTY2WA1N3nmS6wyL5scb1n ph9G/7oG8TJZyC1DTUI9mUtu1GVO9UY18PryP5+LxfwP2Lp/vp0Jc4B5vb3loDBmJc FmI3ACPNrSOLg== X-Nifty-SrcIP: [133.32.177.133] From: Masahiro Yamada To: Marc Zyngier , James Morse , Alexandru Elisei , Suzuki K Poulose , linux-arm-kernel@lists.infradead.org, kvmarm@lists.cs.columbia.edu Cc: Masahiro Yamada , Andrew Jones , Catalin Marinas , Fuad Tabba , Kefeng Wang , Keir Fraser , Will Deacon , Zenghui Yu , linux-kernel@vger.kernel.org Subject: [PATCH 1/2] KVM: arm64: nvhe: rename confusing obj-y Date: Mon, 13 Jun 2022 18:20:25 +0900 Message-Id: <20220613092026.1705630-1-masahiroy@kernel.org> X-Mailer: git-send-email 2.32.0 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220613_022107_182250_4C116744 X-CRM114-Status: UNSURE ( 7.66 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org This Makefile appends several objects to obj-y from line 15, but none of them is linked to vmlinux in an ordinary way. obj-y is overwritten at line 30: obj-y := kvm_nvhe.o So, kvm_nvhe.o is the only object directly linked to vmlinux. Replace the abused obj-y with hyp-obj-y. Signed-off-by: Masahiro Yamada --- arch/arm64/kvm/hyp/nvhe/Makefile | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/arch/arm64/kvm/hyp/nvhe/Makefile b/arch/arm64/kvm/hyp/nvhe/Makefile index f9fe4dc21b1f..3c6d3a18171c 100644 --- a/arch/arm64/kvm/hyp/nvhe/Makefile +++ b/arch/arm64/kvm/hyp/nvhe/Makefile @@ -12,13 +12,13 @@ HOST_EXTRACFLAGS += -I$(objtree)/include lib-objs := clear_page.o copy_page.o memcpy.o memset.o lib-objs := $(addprefix ../../../lib/, $(lib-objs)) -obj-y := timer-sr.o sysreg-sr.o debug-sr.o switch.o tlb.o hyp-init.o host.o \ +hyp-obj-y := timer-sr.o sysreg-sr.o debug-sr.o switch.o tlb.o hyp-init.o host.o \ hyp-main.o hyp-smp.o psci-relay.o early_alloc.o page_alloc.o \ cache.o setup.o mm.o mem_protect.o sys_regs.o pkvm.o -obj-y += ../vgic-v3-sr.o ../aarch32.o ../vgic-v2-cpuif-proxy.o ../entry.o \ +hyp-obj-y += ../vgic-v3-sr.o ../aarch32.o ../vgic-v2-cpuif-proxy.o ../entry.o \ ../fpsimd.o ../hyp-entry.o ../exception.o ../pgtable.o -obj-$(CONFIG_DEBUG_LIST) += list_debug.o -obj-y += $(lib-objs) +hyp-obj-$(CONFIG_DEBUG_LIST) += list_debug.o +hyp-obj-y += $(lib-objs) ## ## Build rules for compiling nVHE hyp code @@ -26,7 +26,7 @@ obj-y += $(lib-objs) ## file containing all nVHE hyp code and data. ## -hyp-obj := $(patsubst %.o,%.nvhe.o,$(obj-y)) +hyp-obj := $(patsubst %.o,%.nvhe.o,$(hyp-obj-y)) obj-y := kvm_nvhe.o extra-y := $(hyp-obj) kvm_nvhe.tmp.o kvm_nvhe.rel.o hyp.lds hyp-reloc.S hyp-reloc.o From patchwork Mon Jun 13 09:20:26 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 12879230 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 2ED7DC43334 for ; Mon, 13 Jun 2022 09:22:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=Wiyu/QLUMh7dprFKzY8GA0+qGcIfca9dAgU0Ct4HroY=; b=HFLgzXWfLedq5C hfj90U5j+IzvAZf425g3KkDwYgNZPrFFWDro7NnXBuGxCecB+B/vvItuwlgKTuRhEu+uuk49WWllp TzqC0pKjM4VD5PGdR328cM7kcJYRTYZBj6uo/Cpf0KuZIZ1zJ7yAl23CL6Wk0yhLKF0qklLuDz+Ho qTyCdVIxMBGekDyp/yRZz53d13Q8tPkpQVll3rplhLvQgxNX6UwXaJCYkxZ8hbY56ftf7bFOUpVxx fvPb35BeE2s/2Qf2Zb2XB74I6p06CroQyUFeHCBYa3oGC0zRln1hCNNSDZJSPVG0kRWHZYH9o77ig ZBv1tYoun/bYSBZbDoNg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1o0gGC-002Vf7-M6; Mon, 13 Jun 2022 09:21:24 +0000 Received: from conuserg-11.nifty.com ([210.131.2.78]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1o0gFu-002VUz-K6 for linux-arm-kernel@lists.infradead.org; Mon, 13 Jun 2022 09:21:08 +0000 Received: from grover.sesame (133-32-177-133.west.xps.vectant.ne.jp [133.32.177.133]) (authenticated) by conuserg-11.nifty.com with ESMTP id 25D9Kgx8000823; Mon, 13 Jun 2022 18:20:44 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-11.nifty.com 25D9Kgx8000823 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1655112044; bh=geZktAm+s7Yy19cRfK3Fa5IfT7B/Uq8q4gOcEHOo8Ys=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=RNrbi+i2RZvCHfXkLID7CANqJ0V+E5DyR04ZodAvDTdqBbf0l/dHDVkK/8QnbzdAL iv0+AcaU93RhU/Ud/jYNKdy/5H7tTTAArZk7ib7f0VuahuthxsfH/DEUtAQp8UtRMG t+obGikq+j/sSQLDU1ce9chr415/9mvGGGwizVfIAH0cav2l6pI1H6ZSRxDcyIHoc/ SGnyXci+kGWtHOYU9X/1paPVQnE99/8JGJ/cmXuLBJOsjG2mrHlMRvPI1RMqXGYThs eTS84bqPucHC+DviBfzXirCw6hsRffa7c5gkkWSoL2AMbfk/89LKCC1QYb8uBAKeZL b4z5JcK6c4Hpw== X-Nifty-SrcIP: [133.32.177.133] From: Masahiro Yamada To: Marc Zyngier , James Morse , Alexandru Elisei , Suzuki K Poulose , linux-arm-kernel@lists.infradead.org, kvmarm@lists.cs.columbia.edu Cc: Masahiro Yamada , Andrew Jones , Catalin Marinas , Fuad Tabba , Kefeng Wang , Keir Fraser , Will Deacon , Zenghui Yu , linux-kernel@vger.kernel.org Subject: [PATCH 2/2] KVM: arm64: nvhe: add intermediates to 'targets' instead of extra-y Date: Mon, 13 Jun 2022 18:20:26 +0900 Message-Id: <20220613092026.1705630-2-masahiroy@kernel.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20220613092026.1705630-1-masahiroy@kernel.org> References: <20220613092026.1705630-1-masahiroy@kernel.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220613_022107_166771_C43F9E96 X-CRM114-Status: UNSURE ( 9.85 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org These are generated on demand. Adding them to 'targets' is enough. Signed-off-by: Masahiro Yamada --- arch/arm64/kvm/hyp/nvhe/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm64/kvm/hyp/nvhe/Makefile b/arch/arm64/kvm/hyp/nvhe/Makefile index 3c6d3a18171c..a2b0d043dddf 100644 --- a/arch/arm64/kvm/hyp/nvhe/Makefile +++ b/arch/arm64/kvm/hyp/nvhe/Makefile @@ -28,7 +28,7 @@ hyp-obj-y += $(lib-objs) hyp-obj := $(patsubst %.o,%.nvhe.o,$(hyp-obj-y)) obj-y := kvm_nvhe.o -extra-y := $(hyp-obj) kvm_nvhe.tmp.o kvm_nvhe.rel.o hyp.lds hyp-reloc.S hyp-reloc.o +targets += $(hyp-obj) kvm_nvhe.tmp.o kvm_nvhe.rel.o hyp.lds hyp-reloc.S hyp-reloc.o # 1) Compile all source files to `.nvhe.o` object files. The file extension # avoids file name clashes for files shared with VHE.