[PATCH v4 5/5] KVM: arm64: nv: Check for pending unmaps in AT fast path

Dan Carpenter dan at pereq.eu
Wed Dec 2 02:09:00 PST 2026


Once KVM sets ->pending_unmap to true then we are not supposed to
use the shadow MMU.  Test for that in __kvm_at_s1e01_fast() and fall
back to the slow path which does not use the shadow MMU.

Fixes: c268f204f7c5 ("KVM: arm64: nv: Punt stage-2 recycling to a vCPU request")
Signed-off-by: Dan Carpenter <dan at pereq.eu>
---
 arch/arm64/kvm/at.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm64/kvm/at.c b/arch/arm64/kvm/at.c
index 164fee4f0b3e..4765d400d0fc 100644
--- a/arch/arm64/kvm/at.c
+++ b/arch/arm64/kvm/at.c
@@ -1454,7 +1454,7 @@ static u64 __kvm_at_s1e01_fast(struct kvm_vcpu *vcpu, u32 op, u64 vaddr)
 	 * happens, admit defeat immediately and use the SW (slow) path.
 	 */
 	mmu = lookup_s2_mmu(vcpu);
-	if (!mmu)
+	if (!mmu || mmu->pending_unmap)
 		return par;
 
 	if (*this_cpu_ptr(mmu->last_vcpu_ran) != vcpu->vcpu_idx)

-- 
2.53.0




More information about the linux-arm-kernel mailing list