qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v8 03/12] virtio-sound: handle control messages and streams


From: Philippe Mathieu-Daudé
Subject: Re: [PATCH v8 03/12] virtio-sound: handle control messages and streams
Date: Mon, 4 Sep 2023 13:30:46 +0200
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.15.0

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.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]