Skip to content

Commit 53a563b

Browse files
Quentin PerretMarc Zyngier
authored andcommitted
KVM: arm64: Make the hyp memory pool static
The hyp memory pool struct is sized to fit exactly the needs of the hypervisor stage-1 page-table allocator, so it is important it is not used for anything else. As it is currently used only from setup.c, reduce its visibility by marking it static. Signed-off-by: Quentin Perret <[email protected]> Reviewed-by: Andrew Walbran <[email protected]> Signed-off-by: Marc Zyngier <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent a770ee8 commit 53a563b

File tree

2 files changed

+1
-2
lines changed

2 files changed

+1
-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 struct hyp_pool hpool;
1918
extern u64 __io_map_base;
2019

2120
int hyp_create_idmap(u32 hyp_va_bits);

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
#include <nvhe/mm.h>
1818
#include <nvhe/trap_handler.h>
1919

20-
struct hyp_pool hpool;
2120
unsigned long hyp_nr_cpus;
2221

2322
#define hyp_percpu_size ((unsigned long)__per_cpu_end - \
@@ -27,6 +26,7 @@ static void *vmemmap_base;
2726
static void *hyp_pgt_base;
2827
static void *host_s2_pgt_base;
2928
static struct kvm_pgtable_mm_ops pkvm_pgtable_mm_ops;
29+
static struct hyp_pool hpool;
3030

3131
static int divide_memory_pool(void *virt, unsigned long size)
3232
{

0 commit comments

Comments
 (0)