Skip to contentSkip to conversation

KVM: arm64: nv: Release faulted-in VNCR page from mmu_lock critical section

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: Release faulted-in VNCR page from mmu_lock critical section

The conversion to kvm_release_faultin_page() missed the requirement for this to be called within a critical section with mmu_lock held for write. Move this call up to satisfy this requirement.

Fixes 069a05e535496 ("KVM: arm64: nv: Handle VNCR_EL2-triggered faults")
---
 arch/arm64/kvm/nested.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm64/kvm/nested.c +1 -1
index 2381663d2ee98..e7e71f1615f19 100644
@@ -1228,9 +1228,9 @@ static int kvm_translate_vncr(struct kvm_vcpu *vcpu)
 		vt->cpu = -1;
 
 		kvm_make_request(KVM_REQ_MAP_L1_VNCR_EL2, vcpu);
+		kvm_release_faultin_page(vcpu->kvm, page, false, vt->wr.pw);
 	}
 
-	kvm_release_faultin_page(vcpu->kvm, page, false, vt->wr.pw);
 	if (vt->wr.pw)
 		mark_page_dirty(vcpu->kvm, gfn);
 
Signature · 1 line
2.39.2
author maintainer Applied
#1 lore raw
Quoted 5 lines · Marc Zyngier

The conversion to kvm_release_faultin_page() missed the requirement for this to be called within a critical section with mmu_lock held for write. Move this call up to satisfy this requirement.

Applied to next, thanks!

[1/1] KVM: arm64: nv: Release faulted-in VNCR page from mmu_lock critical section

      commit: 538fbac74019c13dac341b20fbcc1e96c9a8d01e

Cheers,

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