virtio-pci: don't try to mask or unmask vqs without notifiers
commit6652d0811c9463fbfb2d2d1cb2ec03f388145c5f
authorJason Wang <jasowang@redhat.com>
Wed, 27 May 2015 08:26:07 +0000 (27 16:26 +0800)
committerMichael S. Tsirkin <mst@redhat.com>
Wed, 3 Jun 2015 16:19:15 +0000 (3 18:19 +0200)
tree0387a91f3632395a4368164b0d4945714f7481a2
parent557772f26b361ade84acecb366fe6fdd2d55a6d9
virtio-pci: don't try to mask or unmask vqs without notifiers

We should validate the vq index against nvqs_with_notifiers. Otherwise we may
try to mask or unmask vector for vqs without notifiers (e.g control vq). This
will lead qemu abort on kvm_irqchip_commit_routes() when trying to boot win8.1
guest.

Fixes 851c2a75a6e80c8aa5e713864d98cfb512e7229b ("virtio-pci: speedup MSI-X
masking and unmasking")

Reported-by: Alex Williamson <alex.williamson@redhat.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
hw/virtio/virtio-pci.c