|
From: | Manos Pitsidianakis |
Subject: | Re: [PATCH v8 03/12] virtio-sound: handle control messages and streams |
Date: | Mon, 04 Sep 2023 14:46:28 +0300 |
User-agent: | meli 0.8.0 |
On Mon, 04 Sep 2023 14:30, Philippe Mathieu-Daudé <philmd@linaro.org> wrote:
On 4/9/23 13:00, Manos Pitsidianakis wrote:On Mon, 04 Sep 2023 13:46, Philippe Mathieu-Daudé <philmd@linaro.org> wrote:+ size_t sz = iov_to_buf(cmd->elem->out_sg, + cmd->elem->out_num, + 0, + &cmd->ctrl, + sizeof(cmd->ctrl)); + if (sz != sizeof(cmd->ctrl)) { + qemu_log_mask(LOG_GUEST_ERROR, + "%s: virtio-snd command size incorrect %zu vs \ + %zu\n", __func__, sz, sizeof(cmd->ctrl)); + return; + } + + trace_virtio_snd_handle_code(cmd->ctrl.code,IIUC the spec, this structure is in little endian, is that right? So shouldn't swap various fields in this series?Not sure about the answer to this. Need input from someone more knowledgeable in virtio.You can test running a big-endian guest (m68k, s390x, sparc64) on your little-endian host.
The linux driver uses le{32,64}_to_cpu for reading fields, if there's any problem then it would be with the host?
[Prev in Thread] | Current Thread | [Next in Thread] |