lkml.org 
[lkml]   [2021]   [Jan]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: [PATCH v2 3/8] KVM: arm64: Add symbol at the beginning of each hyp section
On Tue, 05 Jan 2021 18:05:36 +0000,
David Brazdil <dbrazdil@google.com> 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 <dbrazdil@google.com>
> ---
> 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.
\
 
 \ /
  Last update: 2021-01-23 14:31    [W:0.731 / U:0.008 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site