From: Amit Shah <amit.shah@redhat.com>
To: Anthony Liguori <aliguori@linux.vnet.ibm.com>
Cc: Adam Litke <agl@us.ibm.com>,
Michael Roth <mdroth@linux.vnet.ibm.com>,
"qemu-devel@nongnu.org Developers" <qemu-devel@nongnu.org>
Subject: [Qemu-devel] Re: virtio-serial semantics for binary data and guest agents
Date: Mon, 28 Feb 2011 17:51:32 +0530 [thread overview]
Message-ID: <20110228122132.GA3116@amit-x200.redhat.com> (raw)
In-Reply-To: <4D666EB7.50802@linux.vnet.ibm.com>
On (Thu) 24 Feb 2011 [08:44:07], Anthony Liguori wrote:
> >>>>For instance, if the host side disconnects, then reconnects before
> >>>>we read(), we may never get the read()=0, and our FD remains valid.
> >>>>Whereas with a tcp/unix socket our FD is no longer valid, and the
> >>>>read()=0 is an event we can check for at any point after the other
> >>>>end does a close/disconnect.
> >>>There's SIGIO support, so host connect-disconnect notifications can be
> >>>caught via the signal.
> >>I recall looking into this at some point....but don't we get a SIGIO
> >>for read/write-ability in general?
> >I don't get you -- the virtio_console driver emits the SIGIO signal
> >only when the host side connects or disconnects. See
>
> Um, that's not the expected semantics of SIGIO. SIGIO can be
> delivered for any number of reasons (including on a normal file
> descriptor) so if there's no way to poll for the specific event then
> the mechanism is inherently racy.
Well -- for a custom driver something's going to be non-standard: if
it's baking in connection info into the open/close semantics or having
SIGIO delivered when needed.
However, I think a generic library needs to be used for guest-host
communications, abstracting away virtio-serial entirely. This way,
apps should just communicate over tcp, the library should do the
necessary virtio-serial (or even virt-9pfs) calls. This way, all
guest apps written will be infrastructure-agnostic, and if there's a
better protocol to communicate with, virtio-serial can easily be
dropped w/o modifications to apps.
Amit
next prev parent reply other threads:[~2011-02-28 12:21 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-22 22:40 [Qemu-devel] virtio-serial semantics for binary data and guest agents Michael Roth
2011-02-22 23:09 ` [Qemu-devel] " Anthony Liguori
2011-02-23 4:59 ` Amit Shah
2011-02-23 14:31 ` Michael Roth
2011-02-23 14:36 ` Michael Roth
2011-02-24 12:48 ` Amit Shah
2011-02-24 14:44 ` Anthony Liguori
2011-02-28 12:21 ` Amit Shah [this message]
2011-02-25 20:25 ` Michael Roth
2011-03-01 6:17 ` Amit Shah
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=20110228122132.GA3116@amit-x200.redhat.com \
--to=amit.shah@redhat.com \
--cc=agl@us.ibm.com \
--cc=aliguori@linux.vnet.ibm.com \
--cc=mdroth@linux.vnet.ibm.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).