Commit 8e4ece68 authored by Kunkun Jiang's avatar Kunkun Jiang Committed by Oliver Upton

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: 196b1364 ("KVM: arm/arm64: GICv4: Wire mapping/unmapping of VLPIs in VFIO irq bypass")
Signed-off-by: default avatarKunkun Jiang <jiangkunkun@huawei.com>
Acked-by: default avatarMarc Zyngier <maz@kernel.org>
Reviewed-by: default avatarZenghui Yu <yuzenghui@huawei.com>
Link: https://lore.kernel.org/r/20231120131210.2039-1-jiangkunkun@huawei.comSigned-off-by: default avatarOliver Upton <oliver.upton@linux.dev>
parent b85ea95d
......@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment