[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20211208174552.GD820@willie-the-truck>
Date: Wed, 8 Dec 2021 17:45:53 +0000
From: Will Deacon <will@...nel.org>
To: Quentin Perret <qperret@...gle.com>
Cc: Marc Zyngier <maz@...nel.org>, James Morse <james.morse@....com>,
Alexandru Elisei <alexandru.elisei@....com>,
Suzuki K Poulose <suzuki.poulose@....com>,
Catalin Marinas <catalin.marinas@....com>,
linux-arm-kernel@...ts.infradead.org, kvmarm@...ts.cs.columbia.edu,
linux-kernel@...r.kernel.org, kernel-team@...roid.com
Subject: Re: [PATCH 4/6] KVM: arm64: Make __io_map_base static
On Wed, Dec 08, 2021 at 03:22:57PM +0000, Quentin Perret wrote:
> The __io_map_base variable is used at EL2 to track the end of the
> hypervisor's "private" VA range in nVHE protected mode. However it
> doesn't need to be used outside of mm.c, so let's make it static to keep
> all the hyp VA allocation logic in one place.
>
> Signed-off-by: Quentin Perret <qperret@...gle.com>
> ---
> arch/arm64/kvm/hyp/include/nvhe/mm.h | 1 -
> arch/arm64/kvm/hyp/nvhe/mm.c | 3 ++-
> 2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/arch/arm64/kvm/hyp/include/nvhe/mm.h b/arch/arm64/kvm/hyp/include/nvhe/mm.h
> index 3f60d6cc5368..2d08510c6cc1 100644
> --- a/arch/arm64/kvm/hyp/include/nvhe/mm.h
> +++ b/arch/arm64/kvm/hyp/include/nvhe/mm.h
> @@ -12,7 +12,6 @@
>
> extern struct kvm_pgtable pkvm_pgtable;
> extern hyp_spinlock_t pkvm_pgd_lock;
> -extern u64 __io_map_base;
>
> int hyp_create_idmap(u32 hyp_va_bits);
> int hyp_map_vectors(void);
> diff --git a/arch/arm64/kvm/hyp/nvhe/mm.c b/arch/arm64/kvm/hyp/nvhe/mm.c
> index 9e0ff5a700dd..526a7d6fa86f 100644
> --- a/arch/arm64/kvm/hyp/nvhe/mm.c
> +++ b/arch/arm64/kvm/hyp/nvhe/mm.c
> @@ -19,11 +19,12 @@
>
> struct kvm_pgtable pkvm_pgtable;
> hyp_spinlock_t pkvm_pgd_lock;
> -u64 __io_map_base;
>
> struct memblock_region hyp_memory[HYP_MEMBLOCK_REGIONS];
> unsigned int hyp_memblock_nr;
>
> +static u64 __io_map_base;
> +
> static int __pkvm_create_mappings(unsigned long start, unsigned long size,
> unsigned long phys, enum kvm_pgtable_prot prot)
Acked-by: Will Deacon <will@...nel.org>
Will
Powered by blists - more mailing lists