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

Mapping pages into a protected guest requires the donation of memory
from the host.

Extend pkvm_pgtable_stage2_map() to issue a donate hypercall when the
target VM is protected. Since the hypercall only handles a single page,
the splitting logic used for the share path is not required.

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-14-will@kernel.org
Signed-off-by: Marc Zyngier <maz@kernel.org>
arch/arm64/kvm/pkvm.c