diff options
author | Will Deacon <[email protected]> | 2021-12-15 16:12:27 +0000 |
---|---|---|
committer | Marc Zyngier <[email protected]> | 2021-12-16 12:58:57 +0000 |
commit | e82edcc75c4e2389a3d7223c4ef1737bd9a07e5d (patch) | |
tree | 8067bd77451a49c0669653d9f5bc3fc7d9dfa380 /drivers/usb/cdns3/cdns3-imx.c | |
parent | 61d99e33e757a21b47b8b130e49dcbdfaa5d2b1c (diff) |
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.
Reviewed-by: Andrew Walbran <[email protected]>
Signed-off-by: Will Deacon <[email protected]>
Signed-off-by: Quentin Perret <[email protected]>
Signed-off-by: Marc Zyngier <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Diffstat (limited to 'drivers/usb/cdns3/cdns3-imx.c')
0 files changed, 0 insertions, 0 deletions