FROMLIST: KVM: arm64: Implement do_share() helper for sharing memory
By default, protected KVM isolates memory pages so that they are accessible only to their owner: be it the host kernel, the hypervisor at EL2 or (in future) the guest. Establishing shared-memory regions between these components therefore involves a transition for each page so that the owner can share memory with a borrower under a certain set of permissions. Introduce a do_share() helper for safely sharing a memory region between two components. Currently, only host-to-hyp sharing is implemented, but the code is easily extended to handle other combinations and the permission checks for each component are reusable. Signed-off-by:Will Deacon <will@kernel.org> Signed-off-by:
Quentin Perret <qperret@google.com> Link: https://lore.kernel.org/r/20211201170411.1561936-12-qperret@google.com Bug: 209599700 Change-Id: I7edb1b53014ffb4a5aa7a6ee54fd99d8091b57cd
Loading
Please sign in to comment