Skip to content

Commit 473a3ef

Browse files
Quentin PerretMarc Zyngier
authored andcommitted
KVM: arm64: Make __io_map_base static
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 <[email protected]> Acked-by: Will Deacon <[email protected]> Signed-off-by: Marc Zyngier <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent 53a563b commit 473a3ef

File tree

2 files changed

+2
-2
lines changed
  • arch/arm64/kvm/hyp

2 files changed

+2
-2
lines changed

arch/arm64/kvm/hyp/include/nvhe/mm.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ extern struct memblock_region kvm_nvhe_sym(hyp_memory)[];
1515
extern unsigned int kvm_nvhe_sym(hyp_memblock_nr);
1616
extern struct kvm_pgtable pkvm_pgtable;
1717
extern hyp_spinlock_t pkvm_pgd_lock;
18-
extern u64 __io_map_base;
1918

2019
int hyp_create_idmap(u32 hyp_va_bits);
2120
int hyp_map_vectors(void);

arch/arm64/kvm/hyp/nvhe/mm.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,12 @@
1818

1919
struct kvm_pgtable pkvm_pgtable;
2020
hyp_spinlock_t pkvm_pgd_lock;
21-
u64 __io_map_base;
2221

2322
struct memblock_region hyp_memory[HYP_MEMBLOCK_REGIONS];
2423
unsigned int hyp_memblock_nr;
2524

25+
static u64 __io_map_base;
26+
2627
static int __pkvm_create_mappings(unsigned long start, unsigned long size,
2728
unsigned long phys, enum kvm_pgtable_prot prot)
2829
{

0 commit comments

Comments
 (0)