Skip to contentSkip to conversation

KVM: arm64: nv: Handle TLBI S1E2 for VNCR invalidation with mmu_lock held

PATCH Applied Marc Zyngier 1 participant 2 messages May 21, 2025 – May 23, 2025

Subsystems (2)
lore
Share & tools
lore

Marc Zyngier

author maintainer
#0 lore raw

PATCH 1/1 KVM: arm64: nv: Handle TLBI S1E2 for VNCR invalidation with mmu_lock held

Calling invalidate_vncr_va() without the mmu_lock held for write is a bad idea, and lockdep tells you about that.

Fixes 4ffa72ad8f37e ("KVM: arm64: nv: Add S1 TLB invalidation primitive for VNCR_EL2")
---
 arch/arm64/kvm/nested.c | 2 ++
 1 file changed, 2 insertions(+)
arch/arm64/kvm/nested.c +2 -0
index 56b732003caa7..2381663d2ee98 100644
@@ -1044,6 +1044,8 @@ void kvm_handle_s1e2_tlbi(struct kvm_vcpu *vcpu, u32 inst, u64 val)
 	struct s1e2_tlbi_scope scope = {};
 
 	compute_s1_tlbi_range(vcpu, inst, val, &scope);
+
+	guard(write_lock)(&vcpu->kvm->mmu_lock);
 	invalidate_vncr_va(vcpu->kvm, &scope);
 }
 
Signature · 1 line
2.39.2
author maintainer Applied
#1 lore raw
Quoted 4 lines · Marc Zyngier

Calling invalidate_vncr_va() without the mmu_lock held for write is a bad idea, and lockdep tells you about that.

Applied to next, thanks!

[1/1] KVM: arm64: nv: Handle TLBI S1E2 for VNCR invalidation with mmu_lock held

      commit: beab7d058309bfe0460a441b1c73639941e33d38

Cheers,

	M.
Signature · 1 line
Without deviation from the norm, progress is not possible.