From: Laszlo Ersek <lersek@redhat.com>
To: Stefan Hajnoczi <stefanha@gmail.com>,
Matt Broadstone <mbroadst@gmail.com>
Cc: qemu-devel <qemu-devel@nongnu.org>,
Michael Roth <mdroth@linux.vnet.ibm.com>,
qemu_mail <qemu-discuss@nongnu.org>,
Eric Blake <eblake@redhat.com>,
Michal Privoznik <mprivozn@redhat.com>,
Peter Krempa <pkrempa@redhat.com>
Subject: Re: [Qemu-devel] virtio-serial guest agent channel timing requirements
Date: Sat, 5 Nov 2016 01:01:34 +0100 [thread overview]
Message-ID: <1131844d-c7be-a0b2-b610-d170888c27c9@redhat.com> (raw)
In-Reply-To: <CAJSP0QUt_oBxfWaxYvZX4ySu9t-5OLjr3n9vJkUPX9QZN=_mHQ@mail.gmail.com>
On 11/04/16 23:18, Stefan Hajnoczi wrote:
> On Fri, Nov 4, 2016 at 9:46 PM, Matt Broadstone <mbroadst@gmail.com> wrote:
>> I've progressed with creating my own agent, and have successfully been
>> able to communicate over virtio-serial channels in order to provide
>> two-way communication between hypervisor and guest. My problem now
>> seems to be related to _when_ to start listening to the domain sockets
>> - specifically it seems that if I start listening to the domain
>> sockets on the hypervisor side before the guest (in this case windows
>> guest) is fully loaded, communication will fail over the channel until
>> both sides hangup and try again. Is there any documentation on this
>> behavior, or guidelines I should be following for when to begin
>> communication over the channels?
>
> That sounds odd. I'd expect communicate to work as soon as both host
> and guest are ready.
>
> Have you tried a Linux guest instead of a Windows guest? Perhaps it's
> a bug in the virtio-win drivers.
I'm reminded of the following RHBZs:
https://bugzilla.redhat.com/show_bug.cgi?id=890648 [libvirt]
https://bugzilla.redhat.com/show_bug.cgi?id=1122151 [qemu-kvm]
Please refer especially to the QEMU commits listed in
https://bugzilla.redhat.com/show_bug.cgi?id=890648#c22
namely
e2ae6159de24 virtio-serial: report frontend connection state via
monitor
32a97ea1711f char: report frontend open/closed state in
'query-chardev'
This blurb could also be interesting (linked in
<https://bugzilla.redhat.com/show_bug.cgi?id=890648#c20>):
https://lists.gnu.org/archive/html/qemu-devel/2014-05/msg06366.html
See also further work listed in:
https://bugzilla.redhat.com/show_bug.cgi?id=1244064#c12
The relevant libvirt commits seem to be (some of them are linked in
<https://bugzilla.redhat.com/show_bug.cgi?id=890648>):
24c25a68c21a conf: Add channel state for virtio channels to the XML
15bbaaf014d0 qemu: Add handling for VSERPORT_CHANGE event
4d7eb903119e qemu: chardev: Extract more information about character
devices
21c676c2aa60 qemu: process: Refresh virtio channel guest state when
connecting to mon
1a4609101b63 event: Add guest agent lifecycle event
4ca2744e8b8d examples: Add support for the guest agent lifecycle event
b29f2436ac80 qemu: Emit the guest agent lifecycle event
2af51483cc2f processSerialChangedEvent: Close agent monitor early
f1caa42777ff qemu: Close the agent connection only on agent channel
events
I'm guessing Matt's host-side component (which I assume is not libvirt)
should imitate libvirt's logic here; that is, make use of the
VSERPORT_CHANGE event, and/or invoke "query-chardev" and attend to the
"frontend-open" field in the result. Don't start sending until
query-chardev or VSERPORT_CHANGE reports that the (custom) agent has
connected in the guest.
Thanks
Laszlo
prev parent reply other threads:[~2016-11-05 0:01 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CAMsD-yCyjqP8_j0x3nV=u=_-P-SgvZX_3_QgoAp-Z=jzEa0+uA@mail.gmail.com>
2016-11-04 22:18 ` [Qemu-devel] virtio-serial guest agent channel timing requirements Stefan Hajnoczi
2016-11-05 0:01 ` Laszlo Ersek [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=1131844d-c7be-a0b2-b610-d170888c27c9@redhat.com \
--to=lersek@redhat.com \
--cc=eblake@redhat.com \
--cc=mbroadst@gmail.com \
--cc=mdroth@linux.vnet.ibm.com \
--cc=mprivozn@redhat.com \
--cc=pkrempa@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-discuss@nongnu.org \
--cc=stefanha@gmail.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).