KVM: arm64: Implement __pkvm_host_share_hyp() using do_share()
authorWill Deacon <will@kernel.org>
Wed, 15 Dec 2021 16:12:28 +0000 (16:12 +0000)
committerMarc Zyngier <maz@kernel.org>
Thu, 16 Dec 2021 12:58:57 +0000 (12:58 +0000)
commit1ee32109fd78720259f7431740897d37ebcd84f6
tree3fb7953e0eaeb6a9ddd9ae68de70918e4a00505f
parente82edcc75c4e2389a3d7223c4ef1737bd9a07e5d
KVM: arm64: Implement __pkvm_host_share_hyp() using do_share()

__pkvm_host_share_hyp() shares memory between the host and the
hypervisor so implement it as an invocation of the new do_share()
mechanism.

Note that double-sharing is no longer permitted (as this allows us to
reduce the number of page-table walks significantly), but is thankfully
no longer relied upon by the host.

Signed-off-by: Will Deacon <will@kernel.org>
Signed-off-by: Quentin Perret <qperret@google.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20211215161232.1480836-12-qperret@google.com
arch/arm64/kvm/hyp/nvhe/mem_protect.c