]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
KVM: arm64: Hook up reclaim hypercall to pkvm_pgtable_stage2_destroy()
authorWill Deacon <will@kernel.org>
Mon, 30 Mar 2026 14:48:17 +0000 (15:48 +0100)
committerMarc Zyngier <maz@kernel.org>
Mon, 30 Mar 2026 15:58:08 +0000 (16:58 +0100)
commit4e6e03f9eaddb6be5ca8477dc5642e94ddece47e
tree0e3b4ca45f874aaab4f03297588957dd53329a48
parent0bf5f4d400cd11ab86b25a56b101726e35f3e7cb
KVM: arm64: Hook up reclaim hypercall to pkvm_pgtable_stage2_destroy()

During teardown of a protected guest, its memory pages must be reclaimed
from the hypervisor by issuing the '__pkvm_reclaim_dying_guest_page'
hypercall.

Add a new helper, __pkvm_pgtable_stage2_reclaim(), which is called
during the VM teardown operation to reclaim pages from the hypervisor
and drop the GUP pin on the host.

Tested-by: Fuad Tabba <tabba@google.com>
Tested-by: Mostafa Saleh <smostafa@google.com>
Signed-off-by: Will Deacon <will@kernel.org>
Link: https://patch.msgid.link/20260330144841.26181-17-will@kernel.org
Signed-off-by: Marc Zyngier <maz@kernel.org>
arch/arm64/kvm/pkvm.c