ANDROID: KVM: arm64: Huge page support for pkvm_pinned_page
struct pkvm_pinned_page tracks host donations to the guest. It is used
to know when pages can be unpin. In preparation to handling THP for
guests stage-2, allow the creation of multiple order pkvm_pinned_page.
A single pin is expected to be held for an entire huge page. However, a
guest can decide (even if that is completely counter-productive) to
relinquish a small portion of that huge page. A new counter (pins) is
added to only release a huge page once its entire range has been
yielded.
As we want pkvm_pinned_pages of different sizes, switching their
organization from a red-black tree to maple tree, which ease a range
based search and insertion.
Bug: 278749606
Bug: 278011447
Change-Id: I43d49c286a550fcb8ee861d3d9df9f85f4d2bd76
Signed-off-by:
Vincent Donnefort <vdonnefort@google.com>
Loading
Please sign in to comment