]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: arm64: Extend pkvm_page_state enumeration to handle absent pages
authorWill Deacon <will@kernel.org>
Wed, 15 Dec 2021 16:12:25 +0000 (16:12 +0000)
committerMarc Zyngier <maz@kernel.org>
Thu, 16 Dec 2021 12:58:56 +0000 (12:58 +0000)
commit5754a1c5fa62be5801c7855fc7f82cdc9a4d10a6
treec0b167c645f38850a373cdde1f73c2a84659d9ce
parentfc08eb380c2b7e0990103292d1826712d3e63e37
KVM: arm64: Extend pkvm_page_state enumeration to handle absent pages

Explicitly name the combination of SW0 | SW1 as reserved in the pte and
introduce a new PKVM_NOPAGE meta-state which, although not directly
stored in the software bits of the pte, can be used to represent an
entry for which there is no underlying page. This is distinct from an
invalid pte, as stage-2 identity mappings for the host are created
lazily and so an invalid pte there is the same as a valid mapping for
the purposes of ownership information.

This state will be used for permission checking during page transitions
in later patches.

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