diff options
author | Will Deacon <will@kernel.org> | 2021-12-15 16:12:27 +0000 |
---|---|---|
committer | Marc Zyngier <maz@kernel.org> | 2021-12-16 12:58:57 +0000 |
commit | e82edcc75c4e2389a3d7223c4ef1737bd9a07e5d (patch) | |
tree | 8067bd77451a49c0669653d9f5bc3fc7d9dfa380 /tools/perf/scripts/python | |
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 <qwandor@google.com>
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-11-qperret@google.com
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions