]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
KVM: arm64: Generalise kvm_pgtable_stage2_set_owner()
authorWill Deacon <will@kernel.org>
Mon, 30 Mar 2026 14:48:22 +0000 (15:48 +0100)
committerMarc Zyngier <maz@kernel.org>
Mon, 30 Mar 2026 15:58:08 +0000 (16:58 +0100)
commitc6ba94640cf7b6da902d1d8a1383c7cf2303ca1f
tree361b0e007f93d2b12b7eef0ac0fc82e7fdbba96c
parent664d61690357ac2154cd01d859d97455aa49a81d
KVM: arm64: Generalise kvm_pgtable_stage2_set_owner()

kvm_pgtable_stage2_set_owner() can be generalised into a way to store
up to 59 bits in the page tables alongside a 4-bit 'type' identifier
specific to the format of the 59-bit payload.

Introduce kvm_pgtable_stage2_annotate() and move the existing invalid
ptes (for locked ptes and donated pages) over to the new scheme.

Tested-by: Fuad Tabba <tabba@google.com>
Tested-by: Mostafa Saleh <smostafa@google.com>
Signed-off-by: Will Deacon <will@kernel.org>
Link: https://patch.msgid.link/20260330144841.26181-22-will@kernel.org
Signed-off-by: Marc Zyngier <maz@kernel.org>
arch/arm64/include/asm/kvm_pgtable.h
arch/arm64/kvm/hyp/nvhe/mem_protect.c
arch/arm64/kvm/hyp/pgtable.c