]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: arm64: Implement do_unshare() helper for unsharing memory
authorWill Deacon <will@kernel.org>
Wed, 15 Dec 2021 16:12:29 +0000 (16:12 +0000)
committerMarc Zyngier <maz@kernel.org>
Thu, 16 Dec 2021 12:58:57 +0000 (12:58 +0000)
commit480a11d1a84cb5d0d771ff85bb9dfa8fcb224721
tree7a2e0336eea759f62def0da06d26cb843f1a401c
parentf55067a51d57a9ff915df9ed0b248e32f4b56d89
KVM: arm64: Implement do_unshare() helper for unsharing memory

Tearing down a previously shared memory region results in the borrower
losing access to the underlying pages and returning them to the "owned"
state in the owner.

Implement a do_unshare() helper, along the same lines as do_share(), to
provide this functionality for the host-to-hyp case.

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-13-qperret@google.com
arch/arm64/kvm/hyp/nvhe/mem_protect.c