From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:55952) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RuZEa-0005xu-MX for qemu-devel@nongnu.org; Mon, 06 Feb 2012 19:48:37 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RuZEZ-0006vQ-LN for qemu-devel@nongnu.org; Mon, 06 Feb 2012 19:48:36 -0500 Received: from mail-pz0-f45.google.com ([209.85.210.45]:35225) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RuZEZ-0006vI-Gm for qemu-devel@nongnu.org; Mon, 06 Feb 2012 19:48:35 -0500 Received: by dadp14 with SMTP id p14so7023358dad.4 for ; Mon, 06 Feb 2012 16:48:34 -0800 (PST) Sender: fluxion Date: Mon, 6 Feb 2012 18:48:28 -0600 From: Michael Roth Message-ID: <20120207004828.GA14061@illuin> References: <1328573255-13410-1-git-send-email-mdroth@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1328573255-13410-1-git-send-email-mdroth@linux.vnet.ibm.com> Subject: Re: [Qemu-devel] [PATCH 0/1] qemu-ga: add guest-sync-delimited List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: libvir-list@redhat.com, mprivozn@redhat.com On Mon, Feb 06, 2012 at 06:07:34PM -0600, Michael Roth wrote: > Sorry for the somewhat redundant cover letter, but needed to note that: > > This applies on top of "[PATCH v2 0/8] qemu-ga: add support for Windows", and > can also be obtained from: > git://github.com/mdroth/qemu.git qga-guest-sync-delimited > > As noted in the commit there's a wiki write-up with more details on what > exactly this is for: > > http://wiki.qemu.org/Features/QAPI/GuestAgent#QEMU_Guest_Agent_Protocol > > It's not absolutely required, but it does make dealing with some communication > corner cases a heck of a lot easier. > Actually, let me re-spin this without the deprecated flag for guest-sync, since I suspect a more common client implementation would do something like: qga.write(obj_to_json_string(req_obj)) resp_obj = obj_from_json_string(qga.readline()) as opposed to the JSON streamer that qemu-ga/QMP uses. You might miss a response doing the above approach if there was garbage in the channel, but you'll always been able to recover on the second attempt. So guest-sync is still useful there, assuming we codify 1-line-per-response in the QGA protocol.