summary refs log tree commit diff stats
path: root/qga/commands-posix.c
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2023-04-24 17:50:52 +0100
committerPeter Maydell <peter.maydell@linaro.org>2023-05-02 15:47:41 +0100
commit3e20d90824c262de6887aa1bc52af94db69e4310 (patch)
treeb7668196926efee6bb1d31966d02ede0b0f6eb90 /qga/commands-posix.c
parent2b67d0ff971cb232c6d3cbb2cc44d9e2b7a7aac2 (diff)
downloadfocaccia-qemu-3e20d90824c262de6887aa1bc52af94db69e4310.tar.gz
focaccia-qemu-3e20d90824c262de6887aa1bc52af94db69e4310.zip
hw/sd/allwinner-sdhost: Correctly byteswap descriptor fields
In allwinner_sdhost_process_desc() we just read directly from
guest memory into a host TransferDescriptor struct and back.
This only works on little-endian hosts. Abstract the reading
and writing of descriptors into functions that handle the
byte-swapping so that TransferDescriptor structs as seen by
the rest of the code are always in host-order.

This fixes a failure of one of the avocado tests on s390.

Cc: qemu-stable@nongnu.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-id: 20230424165053.1428857-2-peter.maydell@linaro.org
Diffstat (limited to 'qga/commands-posix.c')
0 files changed, 0 insertions, 0 deletions