qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Michael S. Tsirkin" <mst@redhat.com>
To: Amit Shah <amit.shah@redhat.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] virtio-serial: fix ANY_LAYOUT
Date: Mon, 27 Jul 2015 10:40:03 +0300	[thread overview]
Message-ID: <20150727103913-mutt-send-email-mst@redhat.com> (raw)
In-Reply-To: <20150727064136.GD12267@grmbl.mre>

On Mon, Jul 27, 2015 at 12:11:36PM +0530, Amit Shah wrote:
> On (Mon) 27 Jul 2015 [09:37:47], 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>
> 
> Reviewed-by: Amit Shah <amit.shah@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);
> 
> Not sure why NEEDS_RESET -- anyhow, you planning on doing this?
> 
> 
> 		Amit

Definitely not for 2.4.
It's a guest bug, we need a consistent strategy for handling these.

-- 
MST

  reply	other threads:[~2015-07-27  7:40 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 [this message]
2015-07-27  7:41 ` Jason Wang

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=20150727103913-mutt-send-email-mst@redhat.com \
    --to=mst@redhat.com \
    --cc=amit.shah@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).