KVM: arm64: GICv4: Do not perform a map to a mapped vLPI
PATCH v3 1/1 KVM: arm64: GICv4: Do not perform a map to a mapped vLPI
Before performing a map, let's check whether the vLPI has been mapped.
Fixes 196b136498b3 ("KVM: arm/arm64: GICv4: Wire mapping/unmapping of VLPIs in VFIO irq bypass")
Signed-off-by Kunkun Jiang <[email protected]>
Acked-by Marc Zyngier <[email protected]>
--- arch/arm64/kvm/vgic/vgic-v4.c | 4 ++++ 1 file changed, 4 insertions(+)
arch/arm64/kvm/vgic/vgic-v4.c +4 -0
@@ -436,6 +436,10 @@ int kvm_vgic_v4_set_forwarding(struct kvm *kvm, int virq,if (ret) goto out; +/* Silently exit if the vLPI is already mapped */ +if (irq->hw) + goto out; +/* * Emit the mapping request. If it fails, the ITS probably * isn't v4 compatible, so let's silently bail out. Holding
Signature · 1 line
2.33.0
Quoted 6 lines · Kunkun Jiang
Before performing a map, let's check whether the vLPI has been mapped.
Fixes 196b136498b3 ("KVM: arm/arm64: GICv4: Wire mapping/unmapping of VLPIs in VFIO irq bypass")Signed-off-by Kunkun Jiang <[email protected]>Acked-by Marc Zyngier <[email protected]>
Reviewed-by Zenghui Yu <[email protected]>
Oliver Upton
AppliedQuoted 4 lines · Kunkun Jiang
Before performing a map, let's check whether the vLPI has been mapped.
Applied to kvmarm/fixes, thanks!
[1/1] KVM: arm64: GICv4: Do not perform a map to a mapped vLPI
https://git.kernel.org/kvmarm/kvmarm/c/8e4ece6889a5
--
Best,
Oliver