Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1780612pxb; Sat, 23 Jan 2021 05:33:53 -0800 (PST) X-Google-Smtp-Source: ABdhPJz9tl9ciV9T4nvnEfBmVZuwGKwHCZD+ETxR2YPKIsVBOFZ1H+togkvdgZKst39f64hsuWf1 X-Received: by 2002:a17:906:9497:: with SMTP id t23mr6240412ejx.523.1611408832842; Sat, 23 Jan 2021 05:33:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611408832; cv=none; d=google.com; s=arc-20160816; b=VCPzZXtbRbIdg/HgSWgzz2xnCyNGeGuaFhmXDrAVqNEuoh/6s+/e1nFtUDf81Fy9Wd quCErvI85XPCRvnxBTCRTzJgW65cHK2bICp3wYWcks3YJ1Xet8zBQG48evh7CFkURO0V 69VzXXHtHUekaovU8NcOorI+xg3/0EiuzV6VKGNC5fh2ZwFV1rlk164VyQHg0xYc5fXT +3pp6rNggrGjlcRyXLgr9lD+UpaDgDHitSRBCuU71gETIOgjPx1p++bsFrLgIfisB26m 0+APE/i9zaFqiv6PNVc+u32E/YWzqzzw2/BWWPCdul3YsTQ1/fCYD1SdlprYM/JpYjaP 9AKw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:references:in-reply-to :subject:cc:to:from:message-id:date; bh=l5bDkb045GgGNzwx9zkLb3aS1ZCSNp993Zf+q4s9mfs=; b=suUKyfOewiWDr87bSklWoemBHBFZCMZGvW5Us2+ay4I1AM0A7jh3CyyNIAMD6dJshd yHVhr2dakUpKJZBJrhSfGDhfgBxZz3/joAkWyLTCWwIwZwdvxXfe5iGRfIPM7GPx7eLs 04SNKqus3n31t+lFAs0pDTECovfPfvSYvXoJhv8NwgLNMWWPWIltZenJYqmKrbcjSzgL GA13lFs0BkFtn7Sr/6OgTePK/ESNuHvq2c1L2iYjoQiXlGT42io8Pe/c+Lu/PRnYg9K7 /NLdvXsWOLJNm7dHL7TrvdZ245g/ms6DgJb0ZSJ+AMWgDR1BjfNHHh/FrBhANdhAsgI5 G5/g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id jg20si4028232ejc.125.2021.01.23.05.33.25; Sat, 23 Jan 2021 05:33:52 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725819AbhAWNbD (ORCPT + 99 others); Sat, 23 Jan 2021 08:31:03 -0500 Received: from mail.kernel.org ([198.145.29.99]:58758 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725769AbhAWNbB (ORCPT ); Sat, 23 Jan 2021 08:31:01 -0500 Received: from disco-boy.misterjones.org (disco-boy.misterjones.org [51.254.78.96]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id CB92222AAA; Sat, 23 Jan 2021 13:30:20 +0000 (UTC) Received: from 78.163-31-62.static.virginmediabusiness.co.uk ([62.31.163.78] helo=wait-a-minute.misterjones.org) by disco-boy.misterjones.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94) (envelope-from ) id 1l3Iza-009blL-SU; Sat, 23 Jan 2021 13:30:19 +0000 Date: Sat, 23 Jan 2021 13:30:09 +0000 Message-ID: <87zh0zkcgu.wl-maz@kernel.org> From: Marc Zyngier To: David Brazdil Cc: kvmarm@lists.cs.columbia.edu, Catalin Marinas , Will Deacon , James Morse , Julien Thierry , Suzuki K Poulose , Ard Biesheuvel , Mark Rutland , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 3/8] KVM: arm64: Add symbol at the beginning of each hyp section In-Reply-To: <20210105180541.65031-4-dbrazdil@google.com> References: <20210105180541.65031-1-dbrazdil@google.com> <20210105180541.65031-4-dbrazdil@google.com> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM-LB/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL-LB/10.8 EasyPG/1.0.0 Emacs/27.1 (x86_64-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII X-SA-Exim-Connect-IP: 62.31.163.78 X-SA-Exim-Rcpt-To: dbrazdil@google.com, kvmarm@lists.cs.columbia.edu, catalin.marinas@arm.com, will@kernel.org, james.morse@arm.com, julien.thierry.kdev@gmail.com, suzuki.poulose@arm.com, ardb@kernel.org, mark.rutland@arm.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 05 Jan 2021 18:05:36 +0000, David Brazdil wrote: > > Generating hyp relocations will require referencing positions at a given > offset from the beginning of hyp sections. Since the final layout will > not be determined until the linking of `vmlinux`, modify the hyp linker > script to insert a symbol at the first byte of each hyp section to use > as an anchor. The linker of `vmlinux` will place the symbols together > with the sections. > > Signed-off-by: David Brazdil > --- > arch/arm64/include/asm/hyp_image.h | 29 +++++++++++++++++++++++++++-- > arch/arm64/kvm/hyp/nvhe/hyp.lds.S | 4 ++-- > 2 files changed, 29 insertions(+), 4 deletions(-) > > diff --git a/arch/arm64/include/asm/hyp_image.h b/arch/arm64/include/asm/hyp_image.h > index daa1a1da539e..f97b774b58f4 100644 > --- a/arch/arm64/include/asm/hyp_image.h > +++ b/arch/arm64/include/asm/hyp_image.h > @@ -7,6 +7,9 @@ > #ifndef __ARM64_HYP_IMAGE_H__ > #define __ARM64_HYP_IMAGE_H__ > > +#define HYP_CONCAT(a, b) __HYP_CONCAT(a, b) > +#define __HYP_CONCAT(a, b) a ## b > + OK, this may seem like a completely pointless comment, but I have a total mental block when I see macros written upside down I'll fix that myself, no need to resend just for that. Thanks, M. -- Without deviation from the norm, progress is not possible.