Re: [PATCH 2/2] hw/net/allwinner-sun8i-emac: Correctly byteswap descriptor fields

2023-04-25 Thread Philippe Mathieu-Daudé
On 24/4/23 18:50, Peter Maydell wrote: In allwinner-sun8i-emac we just read directly from guest memory into a host FrameDescriptor struct and back. This only works on little-endian hosts. Reading and writing of descriptors is already abstracted into functions; make those functions also handle t

Re: [PATCH 2/2] hw/net/allwinner-sun8i-emac: Correctly byteswap descriptor fields

2023-04-24 Thread Alex Bennée
Peter Maydell writes: > In allwinner-sun8i-emac we just read directly from guest memory into > a host FrameDescriptor struct and back. This only works on > little-endian hosts. Reading and writing of descriptors is already > abstracted into functions; make those functions also handle the > by

Re: [PATCH 2/2] hw/net/allwinner-sun8i-emac: Correctly byteswap descriptor fields

2023-04-24 Thread Thomas Huth
On 24/04/2023 18.50, Peter Maydell wrote: In allwinner-sun8i-emac we just read directly from guest memory into a host FrameDescriptor struct and back. This only works on little-endian hosts. Reading and writing of descriptors is already abstracted into functions; make those functions also handl

[PATCH 2/2] hw/net/allwinner-sun8i-emac: Correctly byteswap descriptor fields

2023-04-24 Thread Peter Maydell
In allwinner-sun8i-emac we just read directly from guest memory into a host FrameDescriptor struct and back. This only works on little-endian hosts. Reading and writing of descriptors is already abstracted into functions; make those functions also handle the byte-swapping so that TransferDescript