[PATCH 0/2] arm: allwinner: fix endianness bugs in sdhost and sun8i-emac

Peter Maydell posted 2 patches 1 year ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20230424165053.1428857-1-peter.maydell@linaro.org
Maintainers: Beniamino Galvani <b.galvani@gmail.com>, Peter Maydell <peter.maydell@linaro.org>, Strahinja Jankovic <strahinja.p.jankovic@gmail.com>, Jason Wang <jasowang@redhat.com>
hw/net/allwinner-sun8i-emac.c | 22 +++++++++++++++-------
hw/sd/allwinner-sdhost.c      | 31 ++++++++++++++++++++++++++-----
2 files changed, 41 insertions(+), 12 deletions(-)
[PATCH 0/2] arm: allwinner: fix endianness bugs in sdhost and sun8i-emac
Posted by Peter Maydell 1 year ago
This patchset fixes bugs in the sd controller and ethernet controller
devices used in the orangepi-pc board model. The bug is the same in
both cases: we read and write a descriptor struct from guest memory
without byte-swapping it, so the code only does the right thing on
a little-endian host.

These fixes (together with some of the others I've sent out earlier
today) are enough to get the BootLinuxConsole.test_arm_orangepi_sd
avocado test passing on an s390x host.

thanks
-- PMM

Peter Maydell (2):
  hw/sd/allwinner-sdhost: Correctly byteswap descriptor fields
  hw/net/allwinner-sun8i-emac: Correctly byteswap descriptor fields

 hw/net/allwinner-sun8i-emac.c | 22 +++++++++++++++-------
 hw/sd/allwinner-sdhost.c      | 31 ++++++++++++++++++++++++++-----
 2 files changed, 41 insertions(+), 12 deletions(-)

-- 
2.34.1
Re: [PATCH 0/2] arm: allwinner: fix endianness bugs in sdhost and sun8i-emac
Posted by Peter Maydell 1 year ago
On Mon, 24 Apr 2023 at 17:50, Peter Maydell <peter.maydell@linaro.org> wrote:
>
> This patchset fixes bugs in the sd controller and ethernet controller
> devices used in the orangepi-pc board model. The bug is the same in
> both cases: we read and write a descriptor struct from guest memory
> without byte-swapping it, so the code only does the right thing on
> a little-endian host.
>
> These fixes (together with some of the others I've sent out earlier
> today) are enough to get the BootLinuxConsole.test_arm_orangepi_sd
> avocado test passing on an s390x host.
>



Applied to target-arm.next, thanks.

-- PMM