From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41264) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YYxz3-00032z-Ee for qemu-devel@nongnu.org; Fri, 20 Mar 2015 10:33:10 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YYxz2-0003iO-9m for qemu-devel@nongnu.org; Fri, 20 Mar 2015 10:33:09 -0400 Message-ID: <550C2F9B.4050107@redhat.com> Date: Fri, 20 Mar 2015 08:32:59 -0600 From: Eric Blake MIME-Version: 1.0 References: <1426856744-18750-1-git-send-email-armbru@redhat.com> <1426856744-18750-2-git-send-email-armbru@redhat.com> <550C21DB.8000607@redhat.com> <87h9tf7pbi.fsf@blackfin.pond.sub.org> <550C2577.2010201@redhat.com> <550C26FE.6010807@redhat.com> <87384z4uq4.fsf@blackfin.pond.sub.org> In-Reply-To: <87384z4uq4.fsf@blackfin.pond.sub.org> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="XJGWbibW0ljq314KQpPVTrFXwhcsJTH74" Subject: Re: [Qemu-devel] [PATCH RFC for-2.3 1/1] block: New command line option --no-format-probing List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Markus Armbruster Cc: kwolf@redhat.com, qemu-block@nongnu.org, "libvir-list@redhat.com" , qemu-devel@nongnu.org, Max Reitz , stefanha@redhat.com This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --XJGWbibW0ljq314KQpPVTrFXwhcsJTH74 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 03/20/2015 08:19 AM, Markus Armbruster wrote: >> If (a working version of) this makes it in 2.3, libvirt WILL use it in= >> the next release. It will take me less than 5 minutes to write up the= >> libvirt patch, as long as the new option is advertised via >> query-command-line-options (which means that QMP introspection of the >> new option is a must for v2 :) The real libvirt requirement is that the new option is accessible via _some_ QMP command (doesn't have to be query-command-line-options, but that is the most obvious). >=20 > query-command-line-options covers only options using QemuOpts. Fixing > that defect isn't in the cards for 2.3, which means I'll have to > implement it with QemuOpts. Makes sense, and is certainly easier than figuring out an alternative QMP probing mechanism. >=20 > Ways to do that: >=20 > * Stick it into an existing QemuOpts option. Is there one that fits? > --machine doesn't really fit. Mostly agree; --machine is more for what the guest sees, while this has no impact on the guest ABI. On the other hand, things like -machine accel=3D[tcg|kvm] aren't necessarily guest visible either, so -machine ha= s tended to be a catch-all for other things. But that doesn't mean it should continue to be one. >=20 > * Create a new QemuOpts option for miscellaneous settings. Would --mis= c > format-probing=3Doff be too ugly? Got a better name than --misc? The only clients using the new option will be machine generated, so I don't think ugly appearance is a show-stopper. And -misc really does sound like it is the most amenable to adding other random flags in the future, so I can live with that name. Unless anyone else has a better idea, '-misc format-probing=3Doff' has my= vote and works for libvirt; it is only a two-line change to my libvirt RFC patch: diff --git i/src/qemu/qemu_capabilities.c w/src/qemu/qemu_capabilities.c index b452a75..f7a46c1 100644 --- i/src/qemu/qemu_capabilities.c +++ w/src/qemu/qemu_capabilities.c @@ -2517,7 +2517,7 @@ static struct virQEMUCapsCommandLineProps virQEMUCapsCommandLine[] =3D { { "msg", "timestamp", QEMU_CAPS_MSG_TIMESTAMP }, { "numa", NULL, QEMU_CAPS_NUMA }, { "drive", "throttling.bps-total-max", QEMU_CAPS_DRIVE_IOTUNE_MAX },= - { "no-format-probing", NULL, QEMU_CAPS_NO_FORMAT_PROBING }, + { "misc", "format-probing", QEMU_CAPS_NO_FORMAT_PROBING }, }; static int diff --git i/src/qemu/qemu_command.c w/src/qemu/qemu_command.c index 1085639..08f6560 100644 --- i/src/qemu/qemu_command.c +++ w/src/qemu/qemu_command.c @@ -8674,7 +8674,7 @@ qemuBuildCommandLine(virConnectPtr conn, } if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_NO_FORMAT_PROBING) && !cfg->allowDiskFormatProbing) - virCommandAddArg(cmd, "-no-format-probing"); + virCommandAddArgList(cmd, "-misc", "format-probing=3Doff", NULL)= ; /* Serial graphics adapter */ if (def->os.bios.useserial =3D=3D VIR_TRISTATE_BOOL_YES) { >=20 > Existing miscellaneous non-QemeOpts options could then (in 2.4!) > become sugar for something in this option group, thus become availabl= e > with -readconfig. Nice way to plan for future cleanups. I also agree that while this one option about format-probing is reasonable to get into 2.3, that any other sugar cleanups are better deferred until after the freeze. --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --XJGWbibW0ljq314KQpPVTrFXwhcsJTH74 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJVDC+bAAoJEKeha0olJ0NqqB8H/ikL+dUp8W6GMiCvHR/p59lR OHOOtsAma4UXqUoGMlrwv05cuzrfs/LgsUUTZUZTSLICwfjfqQfaZ7sMlNEyWSry +FcmmiOG9/1/wM0whLQqyDIL7XFoNEaBPniCQgfl/Qjpf7iZh9nSLkkwPh+4PyWO YYwMF8vh9HFUTuBiJMjminqSHmVIHMfCdoK766z3ODbkAv1NLxX/0iZwDel99Skr Sh2u8VvpoIr2cCn8zWfDbzRr5nRIJkteXgtsY4gFMw0x2SjPvgcgE7OL6ZepWy1F OXNYkDfQytsyR9+wfSDS92RMCWxYbuIIHeGmie1Z2Lvwwb5WeqvWMpeXs+BtCNI= =TqHH -----END PGP SIGNATURE----- --XJGWbibW0ljq314KQpPVTrFXwhcsJTH74--