]> git.ipfire.org Git - thirdparty/qemu.git/commit
tests/qtest/libqos: Avoid double swapping when using modern virtio
authorThomas Huth <thuth@redhat.com>
Wed, 30 Apr 2025 13:28:17 +0000 (15:28 +0200)
committerFabiano Rosas <farosas@suse.de>
Fri, 9 May 2025 19:14:31 +0000 (16:14 -0300)
commit3008224ca8a7415323f67d58d8c03e69bde49092
tree5e669e0b04dc5201e3f717a94559d9c99848dad1
parent246069e850327b3d5c7f460461fc0bbf0f817654
tests/qtest/libqos: Avoid double swapping when using modern virtio

The logic in the qvirtio_read/write function is rather a headache,
involving byte-swapping when the target is big endian, just to
maybe involve another byte-swapping  in the qtest_read/write
function immediately afterwards (on the QEMU side). Let's do it in
a more obvious way here: For virtio 1.0, we know that the values have
to be little endian, so let's read/write the bytes in that well known
order here.

Signed-off-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Tested-by: Alex Bennée <alex.bennee@linaro.org>
Message-ID: <20250430132817.610903-1-thuth@redhat.com>
Signed-off-by: Fabiano Rosas <farosas@suse.de>
tests/qtest/libqos/virtio.c