Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NUbvt-0000u0-19 for qemu-devel@nongnu.org; Tue, 12 Jan 2010 03:16:57 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NUbvo-0000sL-C0 for qemu-devel@nongnu.org; Tue, 12 Jan 2010 03:16:56 -0500 Received: from [199.232.76.173] (port=47839 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NUbvo-0000sC-4o for qemu-devel@nongnu.org; Tue, 12 Jan 2010 03:16:52 -0500 Received: from mx20.gnu.org ([199.232.41.8]:54283) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1NUbvn-0002i7-5E for qemu-devel@nongnu.org; Tue, 12 Jan 2010 03:16:51 -0500 Received: from mx1.redhat.com ([209.132.183.28]) by mx20.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NUbvl-000452-RD for qemu-devel@nongnu.org; Tue, 12 Jan 2010 03:16:50 -0500 From: Markus Armbruster Subject: Re: [Qemu-devel] QMP forward compatibility support References: <20100111163422.0d86d2bb@doriath> <4B4B748B.6010008@codemonkey.ws> <20100111220436.14c662a5@doriath> <4B4BC138.1000500@codemonkey.ws> Date: Tue, 12 Jan 2010 09:16:43 +0100 In-Reply-To: <4B4BC138.1000500@codemonkey.ws> (Anthony Liguori's message of "Mon, 11 Jan 2010 18:24:24 -0600") Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Anthony Liguori Cc: aliguori@us.ibm.com, dlaor@redhat.com, avi@redhat.com, qemu-devel@nongnu.org, Luiz Capitulino Anthony Liguori writes: > On 01/11/2010 06:04 PM, Luiz Capitulino wrote: [...] >>>> 3. We should add command(s) to enable/disable protocol features >>>> >>>> 4. Proper feature negotiation is done in pause mode. That's, clients >>>> interested in enabling new protocol features should start QEMU in >>>> pause mode and enable the features they are interested in using >>>> >>>> >>> Why does this matter? >>> >>> We should be careful to support connecting to a VM long after it's been >>> started so any requirement like this is likely to cause trouble. >>> >> If I understood Markus's concerns correctly, he thinks that feature >> negotiation should happen before the protocol is "running", ie. make >> it part of the initial handshake. >> > > I think forcing the negotiation before executing any commands is a > good idea. But I don't think requiring the guest not to be running is > necessary or even useful. > > You don't want to have to support disabling and enabling features in > the middle of a protocol session because then you have to deal with > weird semantics. Agreed. >> Now, if everything is disabled by default and qemu might be running >> already, do we really need to have a handshake? >> > > I think it's valuable to have a discrete period of time when no > commands have been executed where features can be enabled. It > simplifies some nasty edge conditions regarding enabling features > while there are outstanding commands in flight. That's exactly why I lobbied for feature negotiation in the initial handshake, i.e. client connects, server sends greeting with features, client sends features it wants enabled, and only then we enter the normal command loop. Protocol that don't have that tend to get it retrofitted when they evolve. Let's do it now, before backward compatibility concerns force us to do it in an ugly way.