qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v2 1/1] virtio-console: Prevent abort()s in case


From: Amit Shah
Subject: Re: [Qemu-devel] [PATCH v2 1/1] virtio-console: Prevent abort()s in case of host chardev close
Date: Wed, 20 Jul 2011 14:09:02 +0530
User-agent: Mutt/1.5.21 (2010-09-15)

On (Wed) 20 Jul 2011 [09:10:41], Markus Armbruster wrote:
> Amit Shah <address@hidden> writes:
> 
> > A host chardev could close just before the guest sends some data to be
> > written.  This will cause an -EPIPE error.  This shouldn't be propagated
> > to virtio-serial-bus.
> >
> > Ideally we should close the port once -EPIPE is received, but since the
> > chardev interface doesn't return such meaningful values to its users,
> > all we get is -1 for any kind of error.  Just return 0 for now and wait
> > for chardevs to return better error messages to act better on the return
> > messages.
> >
> > Signed-off-by: Amit Shah <address@hidden>
> 
> Besides qemu_chr_write() returning meaningful errors, it would be nice
> to have less harsh error handing in do_flush_queued_data(), wouldn't it?

I wanted to keep the interfaces cleanly separated: virtio-console.c
deals with errors from chardevs.  virtio-serial-bus is only a
transport between the host and guest; and shouldn't have to deal with
chardev errors.  It can at most throttle the guest if the host can't
consume any more data (which is what it now does on errors).

> Short of that, we can either suppress real write errors, or turn a
> perfectly normal condition into an error.  This patch does the latter,
> because it's a much lesser evil.
> 
> Reviewed-by: Markus Armbruster <address@hidden>

Thanks; Anthony merged this yesterday.

                Amit



reply via email to

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