Re: [PATCH v3] fix endianness bug

2024-04-25 Thread Richard Henderson
On 4/25/24 06:41, Alexandra Diupina wrote: +static MemTxResult xlnx_dpdma_read_descriptor(XlnxDPDMAState *s, +uint64_t desc_addr, DPDMADescriptor *desc) +{ +if (dma_memory_read(&address_space_memory, desc_addr, &desc, +sizeof(DPD

[PATCH v3] fix endianness bug

2024-04-25 Thread Alexandra Diupina
Add xlnx_dpdma_read_descriptor() and xlnx_dpdma_write_descriptor() functions. xlnx_dpdma_read_descriptor() combines reading a descriptor from desc_addr by calling dma_memory_read() and swapping the desc fields from guest memory order to host memory order. xlnx_dpdma_write_descriptor() performs simi