Commit f33143d80907602deb1b96db42da93507ed03b31

Authored by Andrey Smetanin
Committed by Paolo Bonzini
1 parent c9a5eccac1

kvm/irqchip: allow only multiple irqchip routes per GSI

Any other irq routing types (MSI, S390_ADAPTER, upcoming Hyper-V
SynIC) map one-to-one to GSI.

Signed-off-by: Andrey Smetanin <asmetanin@virtuozzo.com>
Reviewed-by: Roman Kagan <rkagan@virtuozzo.com>
Signed-off-by: Denis V. Lunev <den@openvz.org>
CC: Vitaly Kuznetsov <vkuznets@redhat.com>
CC: "K. Y. Srinivasan" <kys@microsoft.com>
CC: Gleb Natapov <gleb@kernel.org>
CC: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>

Showing 1 changed file with 3 additions and 3 deletions Side-by-side Diff

... ... @@ -144,11 +144,11 @@
144 144  
145 145 /*
146 146 * Do not allow GSI to be mapped to the same irqchip more than once.
147   - * Allow only one to one mapping between GSI and MSI.
  147 + * Allow only one to one mapping between GSI and non-irqchip routing.
148 148 */
149 149 hlist_for_each_entry(ei, &rt->map[ue->gsi], link)
150   - if (ei->type == KVM_IRQ_ROUTING_MSI ||
151   - ue->type == KVM_IRQ_ROUTING_MSI ||
  150 + if (ei->type != KVM_IRQ_ROUTING_IRQCHIP ||
  151 + ue->type != KVM_IRQ_ROUTING_IRQCHIP ||
152 152 ue->u.irqchip.irqchip == ei->irqchip.irqchip)
153 153 return r;
154 154