KVM: arm64: pkvm: Use the mm_ops indirection for cache maintenance
authorMarc Zyngier <maz@kernel.org>
Fri, 14 Jan 2022 08:57:58 +0000 (08:57 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 1 Feb 2022 16:27:09 +0000 (17:27 +0100)
commit19d4d09c2f163d90ed6bfea778f9bc4f70a3c534
treeff5f13a0869457df08c63a8035baa8e2d9ef6a90
parentee062665fbaef1a5d9092acdc156c0e3fde114a6
KVM: arm64: pkvm: Use the mm_ops indirection for cache maintenance

[ Upstream commit 094d00f8ca58c5d29b25e23b4daaed1ff1f13b41 ]

CMOs issued from EL2 cannot directly use the kernel helpers,
as EL2 doesn't have a mapping of the guest pages. Oops.

Instead, use the mm_ops indirection to use helpers that will
perform a mapping at EL2 and allow the CMO to be effective.

Fixes: 25aa28691bb9 ("KVM: arm64: Move guest CMOs to the fault handlers")
Reviewed-by: Quentin Perret <qperret@google.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20220114125038.1336965-1-maz@kernel.org
Signed-off-by: Sasha Levin <sashal@kernel.org>
arch/arm64/kvm/hyp/pgtable.c