]> www.infradead.org Git - users/jedix/linux-maple.git/commit
KVM: arm64: Fix PAR_EL1.{PTW,S} reporting on AT S1E*
authorMarc Zyngier <maz@kernel.org>
Tue, 22 Apr 2025 12:26:10 +0000 (13:26 +0100)
committerMarc Zyngier <maz@kernel.org>
Wed, 14 May 2025 09:43:50 +0000 (10:43 +0100)
commit493b01de726d02e835c510d01df6880fa28d41b7
tree95552a704e946b57bf45deacaaaf1c7a16c1ad13
parent9c32cda43eb78f78c73aee4aa344b777714e259b
KVM: arm64: Fix PAR_EL1.{PTW,S} reporting on AT S1E*

When an AT S1E* operation fails, we need to report whether the
translation failed at S2, and whether this was during a S1 PTW.

But these two bits are not independent. PAR_EL1.PTW can only be
set of PAR_EL1.S is also set, and PAR_EL1.S can only be set on
its own when the full S1 PTW has succeeded, but that the access
itself is reporting a fault at S2.

As a result, it makes no sense to carry both ptw and s2 as parameters
to fail_s1_walk(), and they should be unified.

This fixes a number of cases where we were reporting PTW=1 *and*
S=0, which makes no sense.

Link: https://lore.kernel.org/r/20250422122612.2675672-2-maz@kernel.org
Signed-off-by: Marc Zyngier <maz@kernel.org>
arch/arm64/kvm/at.c