aboutsummaryrefslogtreecommitdiff
path: root/tests/libqos/virtio.h
diff options
context:
space:
mode:
authorThomas Huth <thuth@redhat.com>2019-09-03 08:18:46 +0200
committerThomas Huth <thuth@redhat.com>2019-09-05 13:18:52 +0200
commitb57ebd57b43db5456b850a81a2ef46b03b8716ca (patch)
tree3b17a6ee9613f599a0ebff783c58ae6dda6ca730 /tests/libqos/virtio.h
parent4d81d77efdce7096e8bbdc18a06cf9b3d376c3cb (diff)
downloadqemu-b57ebd57b43db5456b850a81a2ef46b03b8716ca.zip
qemu-b57ebd57b43db5456b850a81a2ef46b03b8716ca.tar.gz
qemu-b57ebd57b43db5456b850a81a2ef46b03b8716ca.tar.bz2
tests/libqos: Replace clock_step with qtest_clock_step in virtio code
Library functions should not rely on functions that require global_qtest (since they might get used in tests that deal with multiple states). Commit 1999a70a05ad603d ("Make generic virtio code independent from global_qtest") already tried to clean the libqos virtio code, but I missed to replace the clock_step() function. Thus change it now to qtest_clock_step() instead. The logic of the qvirtio_wait_config_isr() function is now pushed to the virtio-mmio.c and virtio-pci.c files instead, since we can get the QTestState here easily. Message-Id: <20190904130047.25808-4-thuth@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
Diffstat (limited to 'tests/libqos/virtio.h')
-rw-r--r--tests/libqos/virtio.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/libqos/virtio.h b/tests/libqos/virtio.h
index 037176d..2cb2448 100644
--- a/tests/libqos/virtio.h
+++ b/tests/libqos/virtio.h
@@ -69,8 +69,8 @@ struct QVirtioBus {
/* Get the queue ISR status of the device */
bool (*get_queue_isr_status)(QVirtioDevice *d, QVirtQueue *vq);
- /* Get the configuration ISR status of the device */
- bool (*get_config_isr_status)(QVirtioDevice *d);
+ /* Wait for the configuration ISR status of the device */
+ void (*wait_config_isr_status)(QVirtioDevice *d, gint64 timeout_us);
/* Select a queue to work on */
void (*queue_select)(QVirtioDevice *d, uint16_t index);
@@ -112,7 +112,7 @@ void qvirtio_set_acknowledge(QVirtioDevice *d);
void qvirtio_set_driver(QVirtioDevice *d);
void qvirtio_set_driver_ok(QVirtioDevice *d);
-void qvirtio_wait_queue_isr(QVirtioDevice *d,
+void qvirtio_wait_queue_isr(QTestState *qts, QVirtioDevice *d,
QVirtQueue *vq, gint64 timeout_us);
uint8_t qvirtio_wait_status_byte_no_isr(QTestState *qts, QVirtioDevice *d,
QVirtQueue *vq,