KVM: arm64: Make memcache anonymous in pgtable allocator
authorQuentin Perret <qperret@google.com>
Fri, 19 Mar 2021 10:01:33 +0000 (10:01 +0000)
committerMarc Zyngier <maz@kernel.org>
Fri, 19 Mar 2021 12:01:21 +0000 (12:01 +0000)
commite37f37a0e780f23210b2a5cb314dab39fea7086a
tree6aa9fb7351c362a2ec52d737abd08ae53aabeb49
parent159b859beed76836a2c7cfa6303c312a40bb9dc7
KVM: arm64: Make memcache anonymous in pgtable allocator

The current stage2 page-table allocator uses a memcache to get
pre-allocated pages when it needs any. To allow re-using this code at
EL2 which uses a concept of memory pools, make the memcache argument of
kvm_pgtable_stage2_map() anonymous, and let the mm_ops zalloc_page()
callbacks use it the way they need to.

Acked-by: Will Deacon <will@kernel.org>
Signed-off-by: Quentin Perret <qperret@google.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20210319100146.1149909-26-qperret@google.com
arch/arm64/include/asm/kvm_pgtable.h
arch/arm64/kvm/hyp/pgtable.c