qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Peter Xu <peterx@redhat.com>
To: Andrea Bolognani <abologna@redhat.com>
Cc: wei@redhat.com, peter.maydell@linaro.org, drjones@redhat.com,
	armbru@redhat.com, mdroth@linux.vnet.ibm.com,
	qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH 1/3] arm: gic: add GICType
Date: Wed, 2 Mar 2016 11:34:44 +0800	[thread overview]
Message-ID: <20160302033444.GA5730@pxdev.xzpeter.org> (raw)
In-Reply-To: <1456842059.3566.11.camel@redhat.com>

On Tue, Mar 01, 2016 at 03:20:59PM +0100, Andrea Bolognani wrote:
> On Tue, 2016-02-23 at 18:52 +0800, Peter Xu wrote:
> > +{ 'enum': 'GICType', 'data': [ 'gicv2', 'gicv3', 'gicv2-kvm', 'gicv3-kvm' ] }
> 
> Wouldn't this conflate the use of accel= and kernel_irqchip= options?

AFAIU, it's not a problem. Let me paste some lines from the original
RFC thread which explains the definition of the entries:

- gicv2:      GIC version 2 without kernel IRQ chip
- gicv2-kvm:  GIC version 2 with kernel IRQ chip
- gicv3:      GIC version 3 without kernel IRQ chip (not supported)
- gicv3-kvm:  GIC version 3 with kernel IRQ chip

(from https://lists.gnu.org/archive/html/qemu-devel/2016-02/msg02882.html)

So... what I understand is that, we are not talking about "accel="
at all. Instead, we are talking about "kernel_irqchip=" only. Or
say, all these GIC version information we provide from QEMU does not
tell whether KVM is supported or not (for "accel=", it is provided
by another QMP message named "query-kvm"). We are only talking about
which kind of GIC we support. In our case, for each version, it
could be supported either in userspace, or in kernel.

> 
> IIUC, depending on the hardware, you might find yourself in the
> following situation:
> 
>   accel=tcg,gic-version=3                     unavailable
>   accel=kvm,kernel_irqchip=off,gic-version=3  unavailable

As explained above, IIUC, both of these two "unavailable" ones
correspond to "gicv3" entry of the results.

>   accel=kvm,gic-version=3                     available

And this one corresponds to "gicv3-kvm" entry.

> 
> so I'd expect the output to be something like
> 
>   [ "v2": { "tcg": true,
>             "kvm-without-kernel-irqchip": true,
>             "kvm": true },
>     "v3": { "tcg": false,
>             "kvm-without-kernel-irqchip": false,
>             "kvm": true } ]

Actually, this reminded me about the "kernel_irqchip=split" case. Do
we need to consider that one? AFAIK, splitted irqchip is only used
for x86 currently. Whether ARM will possibly support splitted kernel
irqchip one day just like x86? If so, I would prefer to change the
query result layout from array to dict, like:

[ "v2": { "emulated": true,
          "split": false,
          "kernel": true },
  "v3": { "emulated": false,
          "split": false,
          "kernel": true } ]

Since the matrix is big enough (2x3) to consider drop the array
format (I'd admit maybe dict is always the best one...).

Peter

> 
> Since libvirt currently doesn't have support for the
> kernel_irqchip= option, it would only take the "tcg" and "kvm"
> values into account; on the other hand, if at some point
> libvirt will grow support for that option it would be able to
> retrieve all the required information.
> 
> Cheers.
> 
> -- 
> Andrea Bolognani
> Software Engineer - Virtualization Team

  reply	other threads:[~2016-03-02  3:35 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-23 10:52 [Qemu-devel] [PATCH 0/3] ARM: add query-gic-capability SMP command Peter Xu
2016-02-23 10:52 ` [Qemu-devel] [PATCH 1/3] arm: gic: add GICType Peter Xu
2016-03-01 14:20   ` Andrea Bolognani
2016-03-02  3:34     ` Peter Xu [this message]
2016-03-02  7:15       ` Peter Xu
2016-03-02  9:47         ` Markus Armbruster
2016-03-02 10:55           ` Peter Xu
2016-03-02 13:59             ` Markus Armbruster
2016-03-03  4:27               ` Peter Xu
2016-03-03  6:34                 ` Markus Armbruster
2016-03-03  6:58                   ` Peter Xu
2016-03-01 16:46   ` Eric Blake
2016-03-02  4:55     ` Peter Xu
2016-02-23 10:52 ` [Qemu-devel] [PATCH 2/3] arm: gic: add "query-gic-capability" interface Peter Xu
2016-02-23 10:52 ` [Qemu-devel] [PATCH 3/3] arm: implement query-gic-capability 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=20160302033444.GA5730@pxdev.xzpeter.org \
    --to=peterx@redhat.com \
    --cc=abologna@redhat.com \
    --cc=armbru@redhat.com \
    --cc=drjones@redhat.com \
    --cc=mdroth@linux.vnet.ibm.com \
    --cc=peter.maydell@linaro.org \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).