Commit e6028184 authored by Vincent Donnefort's avatar Vincent Donnefort Committed by Treehugger Robot
Browse files

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: default avatarVincent Donnefort <vdonnefort@google.com>
parent 69bb5b8c
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment