diff options
author | Marc MarĂ <marc.mari.barcelo@gmail.com> | 2014-09-01 12:07:59 +0200 |
---|---|---|
committer | Stefan Hajnoczi <stefanha@redhat.com> | 2014-09-08 11:12:43 +0100 |
commit | 58368113989403775496b3422f22094713703157 (patch) | |
tree | 164f623592f825c8ee09c1b106f8e475560ef013 /tests/libqos/virtio.c | |
parent | e11199554c568822c3ede3e3b4820ac3a146b1d9 (diff) | |
download | qemu-58368113989403775496b3422f22094713703157.zip qemu-58368113989403775496b3422f22094713703157.tar.gz qemu-58368113989403775496b3422f22094713703157.tar.bz2 |
libqos: Added MSI-X support
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Ă <marc.mari.barcelo@gmail.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Diffstat (limited to 'tests/libqos/virtio.c')
-rw-r--r-- | tests/libqos/virtio.c | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/tests/libqos/virtio.c b/tests/libqos/virtio.c index b1cab1f..16eaf79 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); |