diff options
author | Quentin Perret <qperret@google.com> | 2022-11-10 20:02:35 +0100 |
---|---|---|
committer | Marc Zyngier <maz@kernel.org> | 2022-11-11 17:40:54 +0100 |
commit | 72a5bc0f153ce8ca80e9abbd1d9adec7d586915a (patch) | |
tree | 54709247309ddc8d80d9908c216c7ebcb01685dd /arch/arm64/kvm/hyp/include/nvhe/mm.h | |
parent | KVM: arm64: Move hyp refcount manipulation helpers to common header file (diff) | |
download | linux-72a5bc0f153ce8ca80e9abbd1d9adec7d586915a.tar.xz linux-72a5bc0f153ce8ca80e9abbd1d9adec7d586915a.zip |
KVM: arm64: Allow attaching of non-coalescable pages to a hyp pool
All the contiguous pages used to initialize a 'struct hyp_pool' are
considered coalescable, which means that the hyp page allocator will
actively try to merge them with their buddies on the hyp_put_page() path.
However, using hyp_put_page() on a page that is not part of the inital
memory range given to a hyp_pool() is currently unsupported.
In order to allow dynamically extending hyp pools at run-time, add a
check to __hyp_attach_page() to allow inserting 'external' pages into
the free-list of order 0. This will be necessary to allow lazy donation
of pages from the host to the hypervisor when allocating guest stage-2
page-table pages at EL2.
Tested-by: Vincent Donnefort <vdonnefort@google.com>
Signed-off-by: Quentin Perret <qperret@google.com>
Signed-off-by: Will Deacon <will@kernel.org>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20221110190259.26861-3-will@kernel.org
Diffstat (limited to 'arch/arm64/kvm/hyp/include/nvhe/mm.h')
0 files changed, 0 insertions, 0 deletions