KVM: arm64: Add helpers to tag shared pages in SW bits
authorQuentin Perret <qperret@google.com>
Mon, 9 Aug 2021 15:24:39 +0000 (16:24 +0100)
committerMarc Zyngier <maz@kernel.org>
Wed, 11 Aug 2021 10:39:50 +0000 (11:39 +0100)
commitec250a67ea8db6209918a389554cf3aec0395b1f
tree0abee134e6784634529f6b0893c946676ac4872f
parent4505e9b624cefafa4b75d8a28e72f32076c33375
KVM: arm64: Add helpers to tag shared pages in SW bits

We will soon start annotating shared pages in page-tables in nVHE
protected mode. Define all the states in which a page can be (owned,
shared and owned, shared and borrowed), and provide helpers allowing to
convert this into SW bits annotations using the matching prot
attributes.

Reviewed-by: Fuad Tabba <tabba@google.com>
Signed-off-by: Quentin Perret <qperret@google.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20210809152448.1810400-13-qperret@google.com
arch/arm64/kvm/hyp/include/nvhe/mem_protect.h