diff options
author | Marc Zyngier <maz@kernel.org> | 2021-07-26 16:35:48 +0100 |
---|---|---|
committer | Marc Zyngier <maz@kernel.org> | 2021-08-02 14:05:58 +0100 |
commit | 6011cf68c88545e16cb32039c2cecfdae6a32315 (patch) | |
tree | 53d6a98d92746dd99f9da83062e68db9caf0b60a /lib | |
parent | 63db506e07622c344a3c748a1c06293d48780f83 (diff) |
KVM: arm64: Walk userspace page tables to compute the THP mapping size
We currently rely on the kvm_is_transparent_hugepage() helper to
discover whether a given page has the potential to be mapped as
a block mapping.
However, this API doesn't really give un everything we want:
- we don't get the size: this is not crucial today as we only
support PMD-sized THPs, but we'd like to have larger sizes
in the future
- we're the only user left of the API, and there is a will
to remove it altogether
To address the above, implement a simple walker using the existing
page table infrastructure, and plumb it into transparent_hugepage_adjust().
No new page sizes are supported in the process.
Signed-off-by: Marc Zyngier <maz@kernel.org>
Reviewed-by: Alexandru Elisei <alexandru.elisei@arm.com>
Link: https://lore.kernel.org/r/20210726153552.1535838-3-maz@kernel.org
Diffstat (limited to 'lib')
0 files changed, 0 insertions, 0 deletions