KVM: arm64: Take a pointer to walker data in kvm_dereference_pteref()
authorOliver Upton <oliver.upton@linux.dev>
Fri, 18 Nov 2022 18:22:20 +0000 (18:22 +0000)
committerMarc Zyngier <maz@kernel.org>
Tue, 22 Nov 2022 13:05:53 +0000 (13:05 +0000)
commit3a5154c723ba5ceb9ce374a7307e03263c03fd29
tree2932321eaa6fe00b6ce79b3f5ac192ebf1e51bc4
parent1577cb5823cefdff4416f272a88143ee933d97f5
KVM: arm64: Take a pointer to walker data in kvm_dereference_pteref()

Rather than passing through the state of the KVM_PGTABLE_WALK_SHARED
flag, just take a pointer to the whole walker structure instead. Move
around struct kvm_pgtable and the RCU indirection such that the
associated ifdeffery remains in one place while ensuring the walker +
flags definitions precede their use.

No functional change intended.

Signed-off-by: Oliver Upton <oliver.upton@linux.dev>
Acked-by: Will Deacon <will@kernel.org>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20221118182222.3932898-2-oliver.upton@linux.dev
arch/arm64/include/asm/kvm_pgtable.h
arch/arm64/kvm/hyp/pgtable.c