virtio-pci: fix wrong index in virtio_pci_queue_enabled
commita48aaf882b100b30111b5c7c75e1d9e83fe76cfd
authorYuri Benditovich <yuri.benditovich@daynix.com>
Mon, 27 Jul 2020 14:38:07 +0000 (27 17:38 +0300)
committerJason Wang <jasowang@redhat.com>
Tue, 28 Jul 2020 08:54:46 +0000 (28 16:54 +0800)
treef04cbd8ea2ff425dc936c7923c890fef48ebe1cb
parent93ea484375ab473379dd9c836261ef484bd71ab1
virtio-pci: fix wrong index in virtio_pci_queue_enabled

We should use the index passed by the caller instead of the queue_sel
when checking the enablement of a specific virtqueue.

This is reported in https://bugzilla.redhat.com/show_bug.cgi?id=1702608

Fixes: f19bcdfedd53 ("virtio-pci: implement queue_enabled method")
Signed-off-by: Yuri Benditovich <yuri.benditovich@daynix.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>
hw/virtio/virtio-pci.c