From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57789) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aVetj-0007Oh-G7 for qemu-devel@nongnu.org; Tue, 16 Feb 2016 07:38:32 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aVetf-0002XJ-P6 for qemu-devel@nongnu.org; Tue, 16 Feb 2016 07:38:31 -0500 Received: from mx1.redhat.com ([209.132.183.28]:44293) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aVetf-0002X2-Hm for qemu-devel@nongnu.org; Tue, 16 Feb 2016 07:38:27 -0500 Date: Tue, 16 Feb 2016 12:38:22 +0000 From: "Daniel P. Berrange" Message-ID: <20160216123822.GD11370@redhat.com> References: <87y4amhuz2.fsf@blackfin.pond.sub.org> <87d1rxhid5.fsf@blackfin.pond.sub.org> <20160215201815.yheakyujt4axevse@hawk.localdomain> <87bn7hufrk.fsf@blackfin.pond.sub.org> <20160216101510.GB11370@redhat.com> <1455624345.4617.86.camel@redhat.com> <20160216121532.GC11370@redhat.com> <1455625675.4617.90.camel@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <1455625675.4617.90.camel@redhat.com> Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [libvirt] [RFC PATCH 0/2] ARM: add QMP command to query GIC version Reply-To: "Daniel P. Berrange" List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Andrea Bolognani Cc: Wei Huang , Peter Maydell , Andrew Jones , Libvirt , QEMU Developers , Peter Xu , Paolo Bonzini On Tue, Feb 16, 2016 at 01:27:55PM +0100, Andrea Bolognani wrote: > On Tue, 2016-02-16 at 12:15 +0000, Daniel P. Berrange wrote: > > On Tue, Feb 16, 2016 at 01:05:45PM +0100, Andrea Bolognani wrote: > > > On Tue, 2016-02-16 at 10:15 +0000, Daniel P. Berrange wrote: > > > > > Back to GIV.=C2=A0=C2=A0Recognized values of gic-version are fi= xed at compile > > > > > time: 2, 3, host.=C2=A0=C2=A0Once again, QOM does things in cod= e rather than data: > > > > > the set of values is defined in the setter function > > > > > virt_set_gic_version(). > > > > >=C2=A0=C2=A0 > > > > > Some values are accepted only together with other configuration= : 3 > > > > > requires accel=3Dkvm (for now), host requires -cpu host.=C2=A0=C2= =A0Static > > > > > introspection can't show such constraints. > > > > >=C2=A0=C2=A0 > > > > > Would the proposed query-gic-capability show them?=C2=A0=C2=A0H= ow? > > > >=C2=A0=C2=A0 > > > > Also bear in mind that libvirt probes capabilities using '-m none= ' so > > > > you're not going to have any 'virt' machine type instantiated whe= n > > > > probing is done. > > >=C2=A0 > > > The idea is to add this information to domain capabilities, which > > > already have virtualization type, architecture and machine type as > > > inputs. > >=C2=A0 > > Regardless of the way it is exposed in libvirt API, when libvirt prob= es > > for capabilities it will *always* use '-m none'. >=20 > Domain capabilities are currently derived almost entirely from data > taken from virQEMUCaps, but is there anything stopping us from > calling QEMU with the appropriate machine type from > qemuConnectGetDomainCapabilities() to query for machine type > dependent domain capabilities such as supported values for the > gic-version property? The cost of invoking QEMU for each architecture and probing capabilities is already higher than we would like. If we multiply that cost by the number of machine types, it makes the problem orders of magnitude worse, so we cannot go that route. This is a key reason why we would like to be able to probe properties against QEMU classses without instantiating them. ie so we can launch QEMU once with "-m none" and still be able to query specific properties we want from the 'virt' machine type. A small step towards this was made with a patch we landed to let us register properties against classes in QOM, instead of against objects. We've not done work to convert code internally to use this facility yet though. Regards, Daniel --=20 |: http://berrange.com -o- http://www.flickr.com/photos/dberrange= / :| |: http://libvirt.org -o- http://virt-manager.or= g :| |: http://autobuild.org -o- http://search.cpan.org/~danberr= / :| |: http://entangle-photo.org -o- http://live.gnome.org/gtk-vn= c :|