From 58368113989403775496b3422f22094713703157 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Mar=C3=AD?= Date: Mon, 1 Sep 2014 12:07:59 +0200 Subject: libqos: Added MSI-X support MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Added MSI-X support for qtest PCI. Added MSI-X support for virtio-pci. Added MSI-X test case in virtio-blk-test. Signed-off-by: Marc MarĂ­ Signed-off-by: Stefan Hajnoczi --- tests/libqos/virtio.c | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) (limited to 'tests/libqos/virtio.c') diff --git a/tests/libqos/virtio.c b/tests/libqos/virtio.c index b1cab1f699..16eaf79425 100644 --- a/tests/libqos/virtio.c +++ b/tests/libqos/virtio.c @@ -78,12 +78,25 @@ void qvirtio_set_driver_ok(const QVirtioBus *bus, QVirtioDevice *d) QVIRTIO_DRIVER_OK | QVIRTIO_DRIVER | QVIRTIO_ACKNOWLEDGE); } -bool qvirtio_wait_isr(const QVirtioBus *bus, QVirtioDevice *d, uint8_t mask, +bool qvirtio_wait_queue_isr(const QVirtioBus *bus, QVirtioDevice *d, + QVirtQueue *vq, uint64_t timeout) +{ + do { + clock_step(10); + if (bus->get_queue_isr_status(d, vq)) { + break; /* It has ended */ + } + } while (--timeout); + + return timeout != 0; +} + +bool qvirtio_wait_config_isr(const QVirtioBus *bus, QVirtioDevice *d, uint64_t timeout) { do { clock_step(10); - if (bus->get_isr_status(d) & mask) { + if (bus->get_config_isr_status(d)) { break; /* It has ended */ } } while (--timeout); -- cgit v1.2.3