KVM: arm64: Pass walk flags to kvm_pgtable_stage2_relax_perms
authorQuentin Perret <qperret@google.com>
Wed, 18 Dec 2024 19:40:47 +0000 (19:40 +0000)
committerMarc Zyngier <maz@kernel.org>
Fri, 20 Dec 2024 09:44:00 +0000 (09:44 +0000)
commite279c25d78d6729e39a0221c98185bd0e7aa0c99
tree3c1c849a90b53e17ca007373d3b2c0b819976ff0
parent5398ddc5c90bd418b90d859e9267aa39399021af
KVM: arm64: Pass walk flags to kvm_pgtable_stage2_relax_perms

kvm_pgtable_stage2_relax_perms currently assumes that it is being called
from a 'shared' walker, which will not be true once called from pKVM. To
allow for the re-use of that function, make the walk flags one of its
parameters.

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