KVM: arm64: Huge page support for pKVM guest memory reclaim

When a pKVM guest dies, all its memory must be returned to the host
which can then unpin it. In preparation to handling THP for guest
stage-2, extend that reclaiming interface to take order > 0 pages.

The host keeps track of donations via kvm_pinned_pages, however, in the
case of huge pages, the hypervisor is free of replacing a block mapping
with a page table and to unmap a portion of that newly introduced page
table. Those changes aren't reported to the host as it would be fiddly
to keep page tables and pinned_pages synchronized. The reclaim path must
then handle the case where one of the huge page can't be reclaimed
(-E2BIG) or a fragment of a broken down huge page is already unmapped.

Signed-off-by: Vincent Donnefort <vdonnefort@google.com>
6 files changed