KVM: arm64: nv: Add SW walker for AT S1 emulation
authorMarc Zyngier <maz@kernel.org>
Tue, 18 Jun 2024 09:40:02 +0000 (10:40 +0100)
committerMarc Zyngier <maz@kernel.org>
Fri, 30 Aug 2024 11:04:20 +0000 (12:04 +0100)
commitd6a01a2dc760c8350fa182a6afd69fabab131f73
treeb59535ff13f02bfec7885f01dbec0f20bf70854f
parent97634dac1974d28e5ffc067d257f0b0f79b5ed2e
KVM: arm64: nv: Add SW walker for AT S1 emulation

In order to plug the brokenness of our current AT implementation,
we need a SW walker that is going to... err.. walk the S1 tables
and tell us what it finds.

Of course, it builds on top of our S2 walker, and share similar
concepts. The beauty of it is that since it uses kvm_read_guest(),
it is able to bring back pages that have been otherwise evicted.

This is then plugged in the two AT S1 emulation functions as
a "slow path" fallback. I'm not sure it is that slow, but hey.

Reviewed-by: Alexandru Elisei <alexandru.elisei@arm.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
arch/arm64/kvm/at.c