From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38888) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1al5HB-0005DK-O0 for qemu-devel@nongnu.org; Tue, 29 Mar 2016 21:50:31 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1al5HA-0007ZQ-Hm for qemu-devel@nongnu.org; Tue, 29 Mar 2016 21:50:29 -0400 References: <1458788142-17509-1-git-send-email-peterx@redhat.com> <1458788142-17509-2-git-send-email-peterx@redhat.com> From: Eric Blake Message-ID: <56FB30DB.3040607@redhat.com> Date: Tue, 29 Mar 2016 19:50:19 -0600 MIME-Version: 1.0 In-Reply-To: <1458788142-17509-2-git-send-email-peterx@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="B8e0eKXD7jNwoXUF0pwa8IGE0w8Ka4Gwu" Subject: Re: [Qemu-devel] [PATCH v7 1/4] arm: qmp: add query-gic-capabilities interface List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Xu , qemu-devel@nongnu.org Cc: wei@redhat.com, peter.maydell@linaro.org, drjones@redhat.com, mdroth@linux.vnet.ibm.com, libvir-list@redhat.com, armbru@redhat.com, abologna@redhat.com, qemu-arm@nongnu.org, serge.fdrv@gmail.com, christoffer.dall@linaro.org This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --B8e0eKXD7jNwoXUF0pwa8IGE0w8Ka4Gwu Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 03/23/2016 08:55 PM, Peter Xu wrote: > This patch add "query-gic-capabilities" but does not implemnet it. The s/implemnet/implement/ > command is ARM-only. The command will return a list of GICCapability > struct that describes all GIC versions that current QEMU and system > support. >=20 > Libvirt is possibly the first consumer of this new command. >=20 > Before this patch, user will successfully configure all kinds of GIC > devices for ARM guests, no matter whether current QEMU/kernel support > it. If the specified GIC version/type is not supported, user will got a= n > ambiguous "QEMU boot failure" when trying to start the VM. This is not > user-friendly. >=20 > With this patch, libvirt should be able to query which type (and which > version) of GIC device that we support. Use this information, libvirt > can warn the user during configuration of guests when specified GIC > device type is not supported. Or better, we can just list those version= s > that we support, and filter out those not-supported ones. >=20 > For example, if we got the query result: >=20 > {"return": [{"emulated": false, "version": 3, "kernel": true}, > {"emulated": true, "version": 2, "kernel": false}]} >=20 > Then it means that we support emulated GIC version 2 using: >=20 > qemu-system-aarch64 -M virt,accel=3Dtcg,gic-version=3D2 ... >=20 > or kvm-accelerated GIC version 3 using: >=20 > qemu-system-aarch64 -M virt,accel=3Dkvm,gic-version=3D3 ... This helps - it shows how libvirt will map the query into qemu command lines. >=20 > If we specify other explicit GIC version rather than the above, QEMU > will not be able to boot. >=20 > Besides, the community is working on a more generic way to query these > kind of information. However, due to the eagerness of this command, we > decided to first implement this ad-hoc one, then when the generic metho= d > is ready, we can move on to that one smoothly. >=20 > Signed-off-by: Peter Xu > --- Interface looks fine from QMP perspective: Reviewed-by: Eric Blake Libvirt should be able to cope with the information here, and introspection will let us know if we ever expand the struct. --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --B8e0eKXD7jNwoXUF0pwa8IGE0w8Ka4Gwu Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJW+zDbAAoJEKeha0olJ0NqbwYH/Rf6neFiw3cpoKporj1HQoFQ 4+BYOoHR5gso0s+bqPgmAXG3gvS2rqp31dBBRZecWDCJhmXNkUibIN8evWmgRT/W MatCWndxoS2vZ0iA0rjNSDt9Yq0RdyvT9+1de/TToRuk2xCJlOyh/KEyMmBHsXQj OTDdhm/WfP++IwM4u6iBkjRqe+DGwCSIuiXpZKZJcdcW/QU+Rpx/LURV7ngg8X7U mzL44uKNTh+e+Sy540E4P8Z5aXUrVnPImOQ1mX3/Jp8mm9K6lLcBTClwq7xQu4cA PQ4jgRyVIDQyCVwIBbeO0y8kPKaVbGD52ZKoccX2Ox2+0kuTwJi77nCdfIgeSBw= =P86s -----END PGP SIGNATURE----- --B8e0eKXD7jNwoXUF0pwa8IGE0w8Ka4Gwu--