From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:57342) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UUIU3-0006OD-05 for qemu-devel@nongnu.org; Mon, 22 Apr 2013 11:16:48 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UUITx-0005mN-UE for qemu-devel@nongnu.org; Mon, 22 Apr 2013 11:16:46 -0400 Received: from mx1.redhat.com ([209.132.183.28]:41562) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UUITx-0005m6-KK for qemu-devel@nongnu.org; Mon, 22 Apr 2013 11:16:41 -0400 Message-ID: <51755432.1040700@redhat.com> Date: Mon, 22 Apr 2013 17:16:02 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <1366365123-5412-1-git-send-email-akong@redhat.com> <51716101.8090705@redhat.com> <20130422114841.GA4053@t430s.nay.redhat.com> <517527FC.2090808@redhat.com> <51755075.1000008@redhat.com> In-Reply-To: <51755075.1000008@redhat.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] monitor: introduce query-config-schema List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Eric Blake Cc: aliguori@us.ibm.com, qemu-devel@nongnu.org, mdroth@linux.vnet.ibm.com, jyang@redhat.com, lcapitulino@redhat.com, Amos Kong -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Il 22/04/2013 17:00, Eric Blake ha scritto: > On 04/22/2013 06:07 AM, Paolo Bonzini wrote: >> Il 22/04/2013 13:48, Amos Kong ha scritto: >>>>>>> Libvirt doesn't have a stable way to know option >>>>>>> support detail. This patch introdued a new qmp command >>>>>>> to query configuration schema information. hmp command >>>>>>> isn't added. >>>>> >>>>> Can you introspect QemuOpts instead? All new options are >>>>> added there. >>> >>> It would be exact to use QemuOpts. I tried to output the >>> vm_config_groups[] in qemu-config.c, but it seems not enough. >>> (desc list of -netdev, -drive, -device are all empty) >> >> That's expected because they are parsed otherwise, depending on >> the backend type. -chardev is currently working but it's an >> implementation detail. > > Libvirt cares most about newly added options, which should use > qemuOpts all the way. We can understand that legacy options like > -netdev might not yet use qemuOpts, but they are also legacy > options, and therefore libvirt can already assume they exist since > at least qemu 1.3 (when libvirt switched over to QMP probing). If > we later add a new feature to -netdev, we should also convert > -netdev to qemuOpts at that time, so that libvirt would know > whether the new feature is available. - -netdev is not a legacy option. -netdev/-drive/-device do use QemuOpts, but not for validation. They create an object, and let the object parse the option. They are more complex than the other option, and need a different kind of introspection (on the properties of a class, or something like that). Paolo > At any rate, we really DO want introspection, and having it in 1.5 > is a worthwhile goal. Even if the introspection turns up empty on > legacy options, having it for the sake of new options is worth the > effort. > -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQIcBAEBAgAGBQJRdVQyAAoJEBvWZb6bTYbyopcP/jE5TX/NziMeXmXmSS+GFn4G 4SH+4XckjZZPe2ZnpshvkWi1OrbsK0CKw9nk4xcZRFmUFnIZ4T1J2VBXodnATvKZ +r6yqvOCuoleWQBlnN8OJm/I5kil5UkztiUSsDbgYyP2D4pr3Z7+uGX7ju/4oGCK qEASGYRsGFItvKkjfUDL2UjBv3dnDerWSPj9IsD/sFajGqcBrvfbGK8YeOG7YvQF Tinv5dhHg9dpnTJ/fwmw0xr3BmgzLf4fT16I73ErG1INOBjWSUPkQ0h8UeydJEJq nvpj3/zlqqJdSNxZXU1FRP+stQN2hHDZsTXhKuY+2kbDFRqpwB8WG94TEbOdx6gr fyNHfueWIByylmQNgbvBCyR2hVI+RipgGHfQ6slTcMMu2pZpZ1m9vWfZF8bvAS+p NL4+Rf+Ic4uMKZnS6GvD15px0ugGPIcDdwX7YgVqjNMIRZhKFiOf9HYnUfJstQpN WrEpcnyE4p0JzkO27Otezoz+RTpJ8HaKHvnsbM49BDlWDMme7jKveymWnCyeJxib g7Hz7V7M76LK0Mlcn66PYctF6JVZP25hC3p3poYbm2F9Duvwg78+b53O6k1XN0sP /kuZfYWrWRr6sx+/oN6HWMP5q60jRVYKUOYcNOriWS+6Yi8xohFvqQVu4qmycXOG 3HBqamagi+JNMiiO9cx/ =4p7B -----END PGP SIGNATURE-----