KVM: arm64: Allow populating software bits
authorQuentin Perret <qperret@google.com>
Mon, 9 Aug 2021 15:24:38 +0000 (16:24 +0100)
committerMarc Zyngier <maz@kernel.org>
Wed, 11 Aug 2021 10:39:50 +0000 (11:39 +0100)
commit4505e9b624cefafa4b75d8a28e72f32076c33375
treeec067052718c4822c0029404a814a468380f943a
parent5651311941105ca077d3ab74dd4a92e646ecf7fb
KVM: arm64: Allow populating software bits

Introduce infrastructure allowing to manipulate software bits in stage-1
and stage-2 page-tables using additional entries in the kvm_pgtable_prot
enum.

This is heavily inspired by Marc's implementation of a similar feature
in the NV patch series, but adapted to allow stage-1 changes as well:

  https://lore.kernel.org/kvmarm/20210510165920.1913477-56-maz@kernel.org/

Suggested-by: Marc Zyngier <maz@kernel.org>
Signed-off-by: Quentin Perret <qperret@google.com>
Reviewed-by: Fuad Tabba <tabba@google.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20210809152448.1810400-12-qperret@google.com
arch/arm64/include/asm/kvm_pgtable.h
arch/arm64/kvm/hyp/pgtable.c