From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NJ5OK-0005oL-UX for qemu-devel@nongnu.org; Fri, 11 Dec 2009 08:18:41 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NJ5OF-0005nC-PM for qemu-devel@nongnu.org; Fri, 11 Dec 2009 08:18:39 -0500 Received: from [199.232.76.173] (port=37813 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NJ5OF-0005n0-9e for qemu-devel@nongnu.org; Fri, 11 Dec 2009 08:18:35 -0500 Received: from e4.ny.us.ibm.com ([32.97.182.144]:36292) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1NJ5OE-00085c-IZ for qemu-devel@nongnu.org; Fri, 11 Dec 2009 08:18:35 -0500 Received: from d01relay01.pok.ibm.com (d01relay01.pok.ibm.com [9.56.227.233]) by e4.ny.us.ibm.com (8.14.3/8.13.1) with ESMTP id nBBD9Y86000859 for ; Fri, 11 Dec 2009 08:09:34 -0500 Received: from d01av03.pok.ibm.com (d01av03.pok.ibm.com [9.56.224.217]) by d01relay01.pok.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id nBBDITr8127834 for ; Fri, 11 Dec 2009 08:18:29 -0500 Received: from d01av03.pok.ibm.com (loopback [127.0.0.1]) by d01av03.pok.ibm.com (8.14.3/8.13.1/NCO v10.0 AVout) with ESMTP id nBBDITv6013030 for ; Fri, 11 Dec 2009 11:18:29 -0200 Message-ID: <4B2246A3.2000905@linux.vnet.ibm.com> Date: Fri, 11 Dec 2009 07:18:27 -0600 From: Anthony Liguori MIME-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH 10/19] monitor: Convert do_info_name() to QObject References: <1260376078-8694-1-git-send-email-lcapitulino@redhat.com> <1260376078-8694-11-git-send-email-lcapitulino@redhat.com> <20091210095237.38cafe5c@doriath> <4B20F003.6070409@linux.vnet.ibm.com> <4B2119F9.6010003@redhat.com> <4B211BE2.60907@linux.vnet.ibm.com> <4B211D6F.7020906@redhat.com> <4B211FDF.4070509@linux.vnet.ibm.com> <4B2120C6.1020004@redhat.com> <20091210145457.25ba1f09@doriath> In-Reply-To: <20091210145457.25ba1f09@doriath> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Luiz Capitulino Cc: qemu-devel@nongnu.org, Avi Kivity , Markus Armbruster Luiz Capitulino wrote: > On Thu, 10 Dec 2009 18:24:38 +0200 > Avi Kivity wrote: > > >>> Let me put it another way, I don't think adding null to the json >>> parser and incorporating it into this command is a good idea at this >>> stage in the release so if we want to do something like this, we need >>> to defer it to 0.13. >>> >>> I agree there are some instances where null could be useful. I think >>> we can get away without it here though. >>> >> For 'name', definitely, since it's known to exist. It would be nice to >> have consistency in how features are presented, though. >> > > Following what you propose, if it's known to exist then we should > never return an empty dict. > > There are other commands that might require adjustments, for example > 'info kvm' has a 'present' key. If QEMU is built w/o KVM support, then > this key will be 'false'. Should we return an empty dict then? > > HPET is another example, currently it's only compiled in if the > target is i386. Otherwise the command won't even be available, and > we have more commands with conditional features/compilation. > > So, what I arguably did wrong here was starting the conversion > work before defining all these rules. > The monitor in general is very ad-hoc. The fact that the info commands don't behave consistently shouldn't be a surprise. Let's focus on converting the remaining monitor commands. The goal is that any user of the monitor today can convert over to QMP. Once we've achieved that goal, let's start looking at introducing proper commands that make sense and are consistent. -- Regards, Anthony Liguori