[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20201123140625.GC490744@google.com>
Date: Mon, 23 Nov 2020 14:06:25 +0000
From: Quentin Perret <qperret@...gle.com>
To: David Brazdil <dbrazdil@...gle.com>
Cc: Catalin Marinas <catalin.marinas@....com>,
Will Deacon <will@...nel.org>, Marc Zyngier <maz@...nel.org>,
James Morse <james.morse@....com>,
Julien Thierry <julien.thierry.kdev@...il.com>,
Suzuki K Poulose <suzuki.poulose@....com>,
Rob Herring <robh+dt@...nel.org>,
Frank Rowand <frowand.list@...il.com>,
"moderated list:ARM64 PORT (AARCH64 ARCHITECTURE)"
<linux-arm-kernel@...ts.infradead.org>,
open list <linux-kernel@...r.kernel.org>,
"open list:KERNEL VIRTUAL MACHINE FOR ARM64 (KVM/arm64)"
<kvmarm@...ts.cs.columbia.edu>,
"open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE"
<devicetree@...r.kernel.org>, kernel-team@...roid.com,
android-kvm@...gle.com
Subject: Re: [RFC PATCH 02/27] KVM: arm64: Link position-independent string
routines into .hyp.text
On Monday 23 Nov 2020 at 12:34:25 (+0000), David Brazdil wrote:
> On Tue, Nov 17, 2020 at 06:15:42PM +0000, 'Quentin Perret' via kernel-team wrote:
> > diff --git a/arch/arm64/kernel/image-vars.h b/arch/arm64/kernel/image-vars.h
> > index 8539f34d7538..dd8ccc9efb6a 100644
> > --- a/arch/arm64/kernel/image-vars.h
> > +++ b/arch/arm64/kernel/image-vars.h
> > @@ -105,6 +105,17 @@ KVM_NVHE_ALIAS(__stop___kvm_ex_table);
> > /* Array containing bases of nVHE per-CPU memory regions. */
> > KVM_NVHE_ALIAS(kvm_arm_hyp_percpu_base);
> >
> > +/* Position-independent library routines */
> > +__kvm_nvhe_clear_page = __kvm_nvhe___pi_clear_page;
> > +__kvm_nvhe_copy_page = __kvm_nvhe___pi_copy_page;
> > +__kvm_nvhe_memcpy = __kvm_nvhe___pi_memcpy;
> > +__kvm_nvhe_memset = __kvm_nvhe___pi_memset;
> > +
> > +#ifdef CONFIG_KASAN
> > +__kvm_nvhe___memcpy = __kvm_nvhe___pi_memcpy;
> > +__kvm_nvhe___memset = __kvm_nvhe___pi_memset;
> > +#endif
> > +
> > #endif /* CONFIG_KVM */
>
> Nit: Would be good to use the kvm_nvhe_sym() helper for the namespacing.
> And feel free to define something like KVM_NVHE_ALIAS for PI in hyp-image.h.
Ack, that'd be much nicer, I'll fix it up for v2.
Thanks,
Quentin
Powered by blists - more mailing lists