summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2023-12-08 13:11:42 -0500
committerPaolo Bonzini <pbonzini@redhat.com>2023-12-08 13:11:42 -0500
commitc8a11a938c9def4e976b3c6f92f01c9b8655ff78 (patch)
tree5edbebef628a053ea358a4dcc4a3b571e7b2a918
parent33cc938e65a98f1d29d0a18403dbbee050dcad9a (diff)
parent8e4ece6889a5b1836b6a135827ac831a5350602a (diff)
Merge tag 'kvmarm-fixes-6.7-1' of git://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarm into kvm-master
KVM/arm64 fixes for 6.7, take #1 - Avoid mapping vLPIs that have already been mapped
-rw-r--r--arch/arm64/kvm/vgic/vgic-v4.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/arm64/kvm/vgic/vgic-v4.c b/arch/arm64/kvm/vgic/vgic-v4.c
index 339a55194b2c..74a67ad87f29 100644
--- a/arch/arm64/kvm/vgic/vgic-v4.c
+++ b/arch/arm64/kvm/vgic/vgic-v4.c
@@ -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