From: Amit Shah <amit.shah@redhat.com>
To: Markus Armbruster <armbru@redhat.com>
Cc: Juan Quintela <quintela@redhat.com>,
qemu list <qemu-devel@nongnu.org>,
Gerd Hoffmann <kraxel@redhat.com>
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 [thread overview]
Message-ID: <20110720083742.GA11592@amit-x200.redhat.com> (raw)
In-Reply-To: <m3ei1lfmvi.fsf@blackfin.pond.sub.org>
On (Wed) 20 Jul 2011 [09:10:41], Markus Armbruster wrote:
> Amit Shah <amit.shah@redhat.com> 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 <amit.shah@redhat.com>
>
> 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 <armbru@redhat.com>
Thanks; Anthony merged this yesterday.
Amit
prev parent reply other threads:[~2011-07-20 8:40 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-07-12 9:28 [Qemu-devel] [PATCH v2 1/1] virtio-console: Prevent abort()s in case of host chardev close Amit Shah
2011-07-12 12:34 ` Amit Shah
2011-07-20 7:10 ` Markus Armbruster
2011-07-20 8:39 ` Amit Shah [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=20110720083742.GA11592@amit-x200.redhat.com \
--to=amit.shah@redhat.com \
--cc=armbru@redhat.com \
--cc=kraxel@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=quintela@redhat.com \
/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).