Good morning Philippe,
On Mon, 04 Sep 2023 13:08, Philippe Mathieu-Daudé <phi...@linaro.org> wrote:
+ iov_from_buf(cmd->elem->in_sg,
+ cmd->elem->in_num,
+ 0,
+ &cmd->resp,
+ sizeof(cmd->resp));
+ virtqueue_push(cmd->vq, cmd->elem, sizeof(cmd->elem));
+ virtio_notify(VIRTIO_DEVICE(s), cmd->vq);
I have very few understanding of virtio, but I'm wondering here,
since this function is called under cmdq_mutex(), could it be
useful to batch the queue by calling virtio_notify() only once
in the caller once the whole cmdq is processed ...
In the linux driver (sound/virtio/virtio_ctl_msg.c), the guest has a
timeout for receiving the message. I found that if I did not notify as
fast as possible, I got timeout errors on the guest.