From: Jason Wang <jasowang@redhat.com>
To: "Michael S. Tsirkin" <mst@redhat.com>, qemu-devel@nongnu.org
Cc: Amit Shah <amit.shah@redhat.com>
Subject: Re: [Qemu-devel] [PATCH] virtio-serial: fix ANY_LAYOUT
Date: Mon, 27 Jul 2015 15:41:07 +0800 [thread overview]
Message-ID: <55B5E093.20703@redhat.com> (raw)
In-Reply-To: <1437979063-25159-1-git-send-email-mst@redhat.com>
On 07/27/2015 02:37 PM, Michael S. Tsirkin wrote:
> Don't assume a specific layout for control messages.
> Required by virtio 1.
>
> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
> ---
> hw/char/virtio-serial-bus.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/hw/char/virtio-serial-bus.c b/hw/char/virtio-serial-bus.c
> index 78c73e5..16de50f 100644
> --- a/hw/char/virtio-serial-bus.c
> +++ b/hw/char/virtio-serial-bus.c
> @@ -195,7 +195,8 @@ static size_t send_control_msg(VirtIOSerial *vser, void *buf, size_t len)
> return 0;
> }
>
> - memcpy(elem.in_sg[0].iov_base, buf, len);
> + /* TODO: detect a buffer that's too short, set NEEDS_RESET */
> + iov_from_buf(&elem.in_sg, buf, len);
>
> virtqueue_push(vq, &elem, len);
> virtio_notify(VIRTIO_DEVICE(vser), vq);
Reviewed-by: Jason Wang <jasowang@redhat.com>
prev parent reply other threads:[~2015-07-27 7:41 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-27 6:37 [Qemu-devel] [PATCH] virtio-serial: fix ANY_LAYOUT Michael S. Tsirkin
2015-07-27 6:41 ` Amit Shah
2015-07-27 7:40 ` Michael S. Tsirkin
2015-07-27 7:41 ` Jason Wang [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=55B5E093.20703@redhat.com \
--to=jasowang@redhat.com \
--cc=amit.shah@redhat.com \
--cc=mst@redhat.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.