[PATCH v2 3/8] KVM: arm64: Add symbol at the beginning of each hyp section
Marc Zyngier
maz at kernel.org
Sat Jan 23 08:30:09 EST 2021
On Tue, 05 Jan 2021 18:05:36 +0000,
David Brazdil <dbrazdil at 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 at 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.
More information about the linux-arm-kernel
mailing list