Re: [PATCH 1/2] hw/sd/allwinner-sdhost: Correctly byteswap descriptor fields

2023-04-25 Thread Philippe Mathieu-Daudé
On 24/4/23 18:50, Peter Maydell wrote: 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

Re: [PATCH 1/2] hw/sd/allwinner-sdhost: Correctly byteswap descriptor fields

2023-04-24 Thread Alex Bennée
Peter Maydell writes: > 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

Re: [PATCH 1/2] hw/sd/allwinner-sdhost: Correctly byteswap descriptor fields

2023-04-24 Thread Thomas Huth
On 24/04/2023 18.50, Peter Maydell wrote: 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

[PATCH 1/2] hw/sd/allwinner-sdhost: Correctly byteswap descriptor fields

2023-04-24 Thread Peter Maydell
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