[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 7/9] libqos/virtio.c: Correct 'flags' reading in qvirtqueue_kick
From: |
Thomas Huth |
Subject: |
[PULL 7/9] libqos/virtio.c: Correct 'flags' reading in qvirtqueue_kick |
Date: |
Mon, 25 Mar 2024 15:12:08 +0100 |
From: Zheyu Ma <zheyuma97@gmail.com>
In qvirtqueue_kick(), the 'flags' were previously being incorrectly read from
vq->avail instead of the correct vq->used location. This update ensures 'flags'
are read from the correct location as per the virtio standard.
Signed-off-by: Zheyu Ma <zheyuma97@gmail.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Message-ID: <20240320090442.267525-1-zheyuma97@gmail.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
tests/qtest/libqos/virtio.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tests/qtest/libqos/virtio.c b/tests/qtest/libqos/virtio.c
index 82a6e122bf..a21b6eee9c 100644
--- a/tests/qtest/libqos/virtio.c
+++ b/tests/qtest/libqos/virtio.c
@@ -394,7 +394,7 @@ void qvirtqueue_kick(QTestState *qts, QVirtioDevice *d,
QVirtQueue *vq,
qvirtio_writew(d, qts, vq->avail + 2, idx + 1);
/* Must read after idx is updated */
- flags = qvirtio_readw(d, qts, vq->avail);
+ flags = qvirtio_readw(d, qts, vq->used);
avail_event = qvirtio_readw(d, qts, vq->used + 4 +
sizeof(struct vring_used_elem) * vq->size);
--
2.44.0
- [PULL 0/9] Patches for QEMU 9.0-rc1, Thomas Huth, 2024/03/25
- [PULL 1/9] .travis.yml: Shorten the runtime of the problematic jobs, Thomas Huth, 2024/03/25
- [PULL 2/9] .travis.yml: Remove the unused xfslib-dev package, Thomas Huth, 2024/03/25
- [PULL 3/9] hw/microblaze: Do not allow xlnx-zynqmp-pmu-soc to be created by the user, Thomas Huth, 2024/03/25
- [PULL 4/9] aspeed: Make the ast2600-a3 SoC not user creatable, Thomas Huth, 2024/03/25
- [PULL 7/9] libqos/virtio.c: Correct 'flags' reading in qvirtqueue_kick,
Thomas Huth <=
- [PULL 5/9] aspeed: Make the ast1030-a1 SoC not user creatable, Thomas Huth, 2024/03/25
- [PULL 8/9] target/s390x: Use mutable temporary value for op_ts, Thomas Huth, 2024/03/25
- [PULL 9/9] tests/tcg/s390x: Test TEST AND SET, Thomas Huth, 2024/03/25
- [PULL 6/9] misc/pca955*: Move models under hw/gpio, Thomas Huth, 2024/03/25
- Re: [PULL 0/9] Patches for QEMU 9.0-rc1, Peter Maydell, 2024/03/25