[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 5/9] tests/libqos: Make virtio-pci code independent f
From: |
Thomas Huth |
Subject: |
[Qemu-devel] [PULL 5/9] tests/libqos: Make virtio-pci code independent from global_qtest |
Date: |
Thu, 15 Aug 2019 19:59:18 +0200 |
The libqos library functions should never depend on global_qtest,
since these functions might be used in tests that track multiple
test states. So let's use the test state of the QPCIDevice instead.
Reviewed-by: Stefan Hajnoczi <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Thomas Huth <address@hidden>
---
tests/libqos/virtio-pci.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/tests/libqos/virtio-pci.c b/tests/libqos/virtio-pci.c
index a622ca26ca..3f55c047a0 100644
--- a/tests/libqos/virtio-pci.c
+++ b/tests/libqos/virtio-pci.c
@@ -138,9 +138,9 @@ static bool qvirtio_pci_get_queue_isr_status(QVirtioDevice
*d, QVirtQueue *vq)
/* No ISR checking should be done if masked, but read anyway */
return qpci_msix_pending(dev->pdev, vqpci->msix_entry);
} else {
- data = readl(vqpci->msix_addr);
+ data = qtest_readl(dev->pdev->bus->qts, vqpci->msix_addr);
if (data == vqpci->msix_data) {
- writel(vqpci->msix_addr, 0);
+ qtest_writel(dev->pdev->bus->qts, vqpci->msix_addr, 0);
return true;
} else {
return false;
@@ -162,9 +162,9 @@ static bool qvirtio_pci_get_config_isr_status(QVirtioDevice
*d)
/* No ISR checking should be done if masked, but read anyway */
return qpci_msix_pending(dev->pdev, dev->config_msix_entry);
} else {
- data = readl(dev->config_msix_addr);
+ data = qtest_readl(dev->pdev->bus->qts, dev->config_msix_addr);
if (data == dev->config_msix_data) {
- writel(dev->config_msix_addr, 0);
+ qtest_writel(dev->pdev->bus->qts, dev->config_msix_addr, 0);
return true;
} else {
return false;
--
2.18.1
- [Qemu-devel] [PULL 0/9] qtest patches, Thomas Huth, 2019/08/15
- [Qemu-devel] [PULL 1/9] qtest: Rename qtest.c:qtest_init(), Thomas Huth, 2019/08/15
- [Qemu-devel] [PULL 2/9] libqos: Account for the ctrl queue in virtio-net, Thomas Huth, 2019/08/15
- [Qemu-devel] [PULL 3/9] tests: Set read-zeroes on for null-co driver, Thomas Huth, 2019/08/15
- [Qemu-devel] [PULL 5/9] tests/libqos: Make virtio-pci code independent from global_qtest,
Thomas Huth <=
- [Qemu-devel] [PULL 4/9] tests/libqos: Make generic virtio code independent from global_qtest, Thomas Huth, 2019/08/15
- [Qemu-devel] [PULL 7/9] tests/libqtest: Clean up qtest_cb_for_every_machine() wrt global_qtest, Thomas Huth, 2019/08/15
- [Qemu-devel] [PULL 6/9] tests/libqtest: Remove unused function hmp(), Thomas Huth, 2019/08/15
- [Qemu-devel] [PULL 9/9] tests/libqtest: Make qmp_assert_success() independent from global_qtest, Thomas Huth, 2019/08/15
- [Qemu-devel] [PULL 8/9] tests/libqtest: Make qtest_qmp_device_add/del independent from global_qtest, Thomas Huth, 2019/08/15
- Re: [Qemu-devel] [PULL 0/9] qtest patches, no-reply, 2019/08/15
- Re: [Qemu-devel] [PULL 0/9] qtest patches, Peter Maydell, 2019/08/16