From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:44512) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WLnyt-0006Ra-5i for qemu-devel@nongnu.org; Fri, 07 Mar 2014 01:10:08 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WLnyo-0002fk-7Q for qemu-devel@nongnu.org; Fri, 07 Mar 2014 01:10:03 -0500 Received: from mx1.redhat.com ([209.132.183.28]:43560) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WLnyn-0002ff-Tg for qemu-devel@nongnu.org; Fri, 07 Mar 2014 01:09:58 -0500 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s2769v74020071 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Fri, 7 Mar 2014 01:09:57 -0500 Date: Fri, 7 Mar 2014 14:09:54 +0800 From: Amos Kong Message-ID: <20140307060954.GA3487@amosk.info> References: <1394073416-12578-1-git-send-email-akong@redhat.com> <1394073416-12578-3-git-send-email-akong@redhat.com> <5318E743.7070609@redhat.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="dDRMvlgZJXvWKvBx" Content-Disposition: inline In-Reply-To: <5318E743.7070609@redhat.com> Subject: Re: [Qemu-devel] [PATCH v4 2/2] query-command-line-options: query all the options in qemu-options.hx List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Eric Blake Cc: qemu-devel@nongnu.org, armbru@redhat.com, lcapitulino@redhat.com, jyang@redhat.com, pbonzini@redhat.com, libvirt-list@redhat.com --dDRMvlgZJXvWKvBx Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Mar 06, 2014 at 02:23:15PM -0700, Eric Blake wrote: > On 03/05/2014 07:36 PM, Amos Kong wrote: > > vm_config_groups[] only contains part of the options which have > > argument, and all options which have no argument aren't added > > to vm_config_groups[]. Current query-command-line-options only > > checks options from vm_config_groups[], so some options will > > be lost. > >=20 > > We have macro in qemu-options.hx to generate a table that > > contains all the options. This patch tries to query options > > from the table. > >=20 > > Then we won't lose the legacy options that weren't added to > > vm_config_groups[] (eg: -vnc, -smbios). The options that have > > no argument will also be returned (eg: -enable-fips) > >=20 > > Some options that have argument have a NULL desc list, some > > options don't have argument, and "parameters" is mandatory > > in the past. So we add a new field "argument" to present > > if the option takes unspecified arguments. >=20 > I like Markus' suggestion of naming the new field > 'unspecified-parameters' rather than 'argument'. >=20 > >=20 > > This patch also fixes options to match their actual command-line > > spelling rather than an alternate name associated with the > > option table in use by the command. >=20 > Should we independently patch hw/acpi/core.c to rename qemu_acpi_opts > from "acpi" to "acpitable" to match the command line option? Same for > vl.c and qemu_boot_opts from "boot-opts" to "boot"? Same for vl.c and > qemu_smp_opts from "smp-opts" to "smp"? Yes, we should. > Those were the obvious > mismatches I found where the command line was spelled differently than > the vm_config_groups entry. >=20 > This is a bug fix patch, so let's shoot to get it into 2.0. >=20 > >=20 > > Signed-off-by: Amos Kong > > --- > > qapi-schema.json | 8 ++++++-- > > qemu-options.h | 10 ++++++++++ > > util/qemu-config.c | 44 ++++++++++++++++++++++++++++++++++++++------ > > vl.c | 15 --------------- > > 4 files changed, 54 insertions(+), 23 deletions(-) >=20 > >=20 > > +++ b/util/qemu-config.c > > @@ -6,6 +6,16 @@ > > #include "hw/qdev.h" > > #include "qapi/error.h" > > #include "qmp-commands.h" > > +#include "qemu-options.h" > > + > > +#define HAS_ARG 0x0001 >=20 > Hmm, we are now duplicating this macro between here and vl.c. I'd > prefer it gets hoisted into the .h file, so that it doesn't get out of > sync between the two clients. >=20 > --=20 > Eric Blake eblake redhat com +1-919-301-3266 > Libvirt virtualization library http://libvirt.org >=20 --=20 Amos. --dDRMvlgZJXvWKvBx Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBAgAGBQJTGWKyAAoJELxSv6I5vP9jG/oP/13FmecPBCvA0byAFp2MNSkk mfGF1Jt4fF/0KjksqV59G+PzyreSILCdxffLS2vxaS7Av7q2ayK2H4M5UDXvPkhf CSw9jAvswM1VEntb/hvD2uQL35Nsublm9dbRYlc9Ch4Gxig48gE+dIfj2OYGrxnV pI4j7luGCo35vI2wDcSd+zyj3iCO0Ao0UX8uDbuje7hUMUPDqJZkSzoure2tWq25 G8CwrT28Ut68B/BeIbpvJWhz5MQIBVZYborGZu+C2KfVPzJinRTvK5ja5Z/DXxvu 7kzCgc1lZw1YuNGqFaXS0wD/jCF4Wz3MxHHVuF8m6XYizD6p3/oYjfhjtKjN20Y7 S4ZTpbDq3dg/pp9lD0oriD/wkVdfMQu1GE3p04xRsnJAzC1Vd5VHlo9OBQYISBxz IpZTb4QckuyGPjT14b6XZvXpz4bcEu2YAldgVOr+ND1gKwHMcW8Phw3iIJ0qq4Og yIWbMyD6Jh1NSXS143jQhBOIDdjXUS+GkajcbKWckI4V1iActHiqM3x0vly94Dn9 AqV74cuavipQKmQeJtyR7FwAbKMC5K795Mhpd0uoosPJxT8cvEXxv4ES9b5RsD1k 5PAB30di/O5IqjZKJ/WN/5tJ2Wg0xj3Z1eeEHAGCn32paiVIZryyZnExOUVLqeKJ 2NwPjzzJNdyMgNPg3tOA =UzUf -----END PGP SIGNATURE----- --dDRMvlgZJXvWKvBx--