aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--virt/kvm/arm/vgic/vgic-v2.c6
-rw-r--r--virt/kvm/arm/vgic/vgic-v3.c6
2 files changed, 8 insertions, 4 deletions
diff --git a/virt/kvm/arm/vgic/vgic-v2.c b/virt/kvm/arm/vgic/vgic-v2.c
index 0a063af40565..9bab86757fa4 100644
--- a/virt/kvm/arm/vgic/vgic-v2.c
+++ b/virt/kvm/arm/vgic/vgic-v2.c
@@ -50,8 +50,10 @@ void vgic_v2_process_maintenance(struct kvm_vcpu *vcpu)
50 50
51 WARN_ON(cpuif->vgic_lr[lr] & GICH_LR_STATE); 51 WARN_ON(cpuif->vgic_lr[lr] & GICH_LR_STATE);
52 52
53 kvm_notify_acked_irq(vcpu->kvm, 0, 53 /* Only SPIs require notification */
54 intid - VGIC_NR_PRIVATE_IRQS); 54 if (vgic_valid_spi(vcpu->kvm, intid))
55 kvm_notify_acked_irq(vcpu->kvm, 0,
56 intid - VGIC_NR_PRIVATE_IRQS);
55 } 57 }
56 } 58 }
57 59
diff --git a/virt/kvm/arm/vgic/vgic-v3.c b/virt/kvm/arm/vgic/vgic-v3.c
index 9f0dae397d9c..5c9f9745e6ca 100644
--- a/virt/kvm/arm/vgic/vgic-v3.c
+++ b/virt/kvm/arm/vgic/vgic-v3.c
@@ -41,8 +41,10 @@ void vgic_v3_process_maintenance(struct kvm_vcpu *vcpu)
41 41
42 WARN_ON(cpuif->vgic_lr[lr] & ICH_LR_STATE); 42 WARN_ON(cpuif->vgic_lr[lr] & ICH_LR_STATE);
43 43
44 kvm_notify_acked_irq(vcpu->kvm, 0, 44 /* Only SPIs require notification */
45 intid - VGIC_NR_PRIVATE_IRQS); 45 if (vgic_valid_spi(vcpu->kvm, intid))
46 kvm_notify_acked_irq(vcpu->kvm, 0,
47 intid - VGIC_NR_PRIVATE_IRQS);
46 } 48 }
47 49
48 /* 50 /*