All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Daniel P. Berrange" <berrange@redhat.com>
To: Markus Armbruster <armbru@redhat.com>
Cc: Wei Huang <wei@redhat.com>,
	Peter Maydell <peter.maydell@linaro.org>,
	Andrew Jones <drjones@redhat.com>,
	Libvirt <libvir-list@redhat.com>,
	QEMU Developers <qemu-devel@nongnu.org>,
	Peter Xu <peterx@redhat.com>,
	Andrea Bolognani <abologna@redhat.com>,
	Paolo Bonzini <pbonzini@redhat.com>
Subject: Re: [Qemu-devel] [RFC PATCH 0/2] ARM: add QMP command to query GIC version
Date: Tue, 16 Feb 2016 10:15:10 +0000	[thread overview]
Message-ID: <20160216101510.GB11370@redhat.com> (raw)
In-Reply-To: <87bn7hufrk.fsf@blackfin.pond.sub.org>

On Tue, Feb 16, 2016 at 11:10:55AM +0100, Markus Armbruster wrote:
> Peter Maydell <peter.maydell@linaro.org> writes:
> 
> > On 15 February 2016 at 20:18, Andrew Jones <drjones@redhat.com> wrote:
> >> On Mon, Feb 15, 2016 at 08:40:54PM +0100, Markus Armbruster wrote:
> >>> How would the command line look like?
> >>>
> >>
> >> Here is what is available today
> >>
> >> # select gicv2 (this work with and without KVM)
> >> qemu-system-aarch64 -M virt                      # v2 is the default
> >> qemu-system-aarch64 -M virt,gic-version=2 ...
> >>
> >> # select gicv3 (only works with KVM)
> >> qemu-system-aarch64 -M virt,gic-version=3 ...
> >
> > This will work with TCG once we get the GICv3 emulation upstream.
> >
> >> # select whatever the host has
> >> qemu-system-aarch64 -M virt,gic-version=host ...
> >
> > This only works with KVM (like -cpu host).
> 
> Aha, it's a machine option.  Therefore, the generic direct solution
> would be command line introspection.  A couple of remarks.
> 
> We don't have comprehensive command line introspection.  There's only
> query-command-line-options, but it's incomplete and insufficiently
> expressive.  We usually sidestep command line introspection and
> introspect the corresponding QMP command, or we "look for a witness" in
> QMP, i.e. some introspectible indicator for the non-introspectible
> feature we need to know.
> 
> The is no QMP command corresponding to --machine.  There's a long term
> vision to start QEMU with a blank slate, then configure everything via
> QMP.  With that, QMP introspection would cover machine options.  Of
> course, visions aren't going to help you now.
> 
> Even if there was a QMP command, the way we do --machine options would
> defeat QMP introspection: they're QOM properties, defined in code.
> 
> Defining things in code is the most flexible solution, but it makes
> reasoning about them *much* harder: the only general way to learn what
> code does is run it.  This is fundamentally incompatible with
> introspection.  In other words, QOM's design sacrifices
> introspectability for flexibility.  The flexibility isn't actually
> needed most of the time, but it defeats introspection all of the time.
> For me, this was an design mistake.  We made the same mistake before,
> with migration.
> 
> I figure we'll need to crack the QOM introspection problem to at least
> some useful degree.  But it's going to be a lot of work.
> 
> A less flexible, introspectible, data-driven interface could be layered
> on top of the code-driven one.  With as many users as possible converted
> to the data-driven interface, the flexibility then defeats introspection
> only where we actually use the flexibility.
> 
> Back to GIV.  Recognized values of gic-version are fixed at compile
> time: 2, 3, host.  Once again, QOM does things in code rather than data:
> the set of values is defined in the setter function
> virt_set_gic_version().
> 
> Some values are accepted only together with other configuration: 3
> requires accel=kvm (for now), host requires -cpu host.  Static
> introspection can't show such constraints.
> 
> Would the proposed query-gic-capability show them?  How?

Also bear in mind that libvirt probes capabilities using '-m none' so
you're not going to have any 'virt' machine type instantiated when
probing is done.

Regards,
Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|

  reply	other threads:[~2016-02-16 10:15 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-14  5:41 [Qemu-devel] [RFC PATCH 0/2] ARM: add QMP command to query GIC version Peter Xu
2016-02-14  5:41 ` [Qemu-devel] [RFC PATCH 1/2] arm: gic: add GICType Peter Xu
2016-02-14  5:41 ` [Qemu-devel] [RFC PATCH 2/2] arm: gic: add "query-gic-capability" interface Peter Xu
2016-02-15  6:54 ` [Qemu-devel] [RFC PATCH 0/2] ARM: add QMP command to query GIC version Wei Huang
2016-02-15  7:34   ` Peter Xu
2016-02-15  7:49     ` Fam Zheng
2016-02-15  9:35 ` [Qemu-devel] [libvirt] " Martin Kletzander
2016-02-15  9:41   ` Peter Maydell
2016-02-15 12:16     ` Andrew Jones
2016-02-15 12:27       ` Pavel Fedin
2016-02-15 10:09   ` Peter Xu
2016-02-15  9:52 ` [Qemu-devel] " Markus Armbruster
2016-02-15 10:34   ` Peter Xu
2016-02-15 15:08     ` Markus Armbruster
2016-02-15 15:21       ` Peter Maydell
2016-02-15 19:40         ` Markus Armbruster
2016-02-15 20:18           ` Andrew Jones
2016-02-15 20:32             ` Peter Maydell
2016-02-16 10:10               ` Markus Armbruster
2016-02-16 10:15                 ` Daniel P. Berrange [this message]
2016-02-16 12:05                   ` [Qemu-devel] [libvirt] " Andrea Bolognani
2016-02-16 12:09                     ` Peter Maydell
2016-02-16 12:20                       ` Andrea Bolognani
2016-02-16 12:15                     ` Daniel P. Berrange
2016-02-16 12:27                       ` Andrea Bolognani
2016-02-16 12:38                         ` Daniel P. Berrange
2016-02-16 13:14                           ` Andrea Bolognani
2016-02-15 15:22       ` [Qemu-devel] " Daniel P. Berrange
2016-02-18  4:40         ` Peter Xu
2016-02-18 16:52           ` Andrew Jones
2016-02-18 17:10             ` Andrea Bolognani
2016-02-19  1:55               ` Peter Xu
2016-02-19 12:33                 ` Andrea Bolognani
2016-02-22  1:35                   ` Peter Xu
2016-02-29 16:30                     ` Andrea Bolognani
2016-03-01  2:19                       ` Peter Xu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160216101510.GB11370@redhat.com \
    --to=berrange@redhat.com \
    --cc=abologna@redhat.com \
    --cc=armbru@redhat.com \
    --cc=drjones@redhat.com \
    --cc=libvir-list@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=peterx@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=wei@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.