All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eric Blake <eblake@redhat.com>
To: Peter Xu <peterx@redhat.com>, qemu-devel@nongnu.org
Cc: 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,
	christoffer.dall@linaro.org
Subject: Re: [Qemu-arm] [PATCH v7 1/4] arm: qmp: add query-gic-capabilities interface
Date: Tue, 29 Mar 2016 19:50:19 -0600	[thread overview]
Message-ID: <56FB30DB.3040607@redhat.com> (raw)
In-Reply-To: <1458788142-17509-2-git-send-email-peterx@redhat.com>

[-- Attachment #1: Type: text/plain, Size: 2324 bytes --]

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.
> 
> Libvirt is possibly the first consumer of this new command.
> 
> 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 an
> ambiguous "QEMU boot failure" when trying to start the VM. This is not
> user-friendly.
> 
> 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 versions
> that we support, and filter out those not-supported ones.
> 
> For example, if we got the query result:
> 
> {"return": [{"emulated": false, "version": 3, "kernel": true},
>             {"emulated": true, "version": 2, "kernel": false}]}
> 
> Then it means that we support emulated GIC version 2 using:
> 
>   qemu-system-aarch64 -M virt,accel=tcg,gic-version=2 ...
> 
> or kvm-accelerated GIC version 3 using:
> 
>   qemu-system-aarch64 -M virt,accel=kvm,gic-version=3 ...

This helps - it shows how libvirt will map the query into qemu command
lines.

> 
> If we specify other explicit GIC version rather than the above, QEMU
> will not be able to boot.
> 
> 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 method
> is ready, we can move on to that one smoothly.
> 
> Signed-off-by: Peter Xu <peterx@redhat.com>
> ---

Interface looks fine from QMP perspective:
Reviewed-by: Eric Blake <eblake@redhat.com>

Libvirt should be able to cope with the information here, and
introspection will let us know if we ever expand the struct.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 604 bytes --]

WARNING: multiple messages have this Message-ID (diff)
From: Eric Blake <eblake@redhat.com>
To: Peter Xu <peterx@redhat.com>, 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
Subject: Re: [Qemu-devel] [PATCH v7 1/4] arm: qmp: add query-gic-capabilities interface
Date: Tue, 29 Mar 2016 19:50:19 -0600	[thread overview]
Message-ID: <56FB30DB.3040607@redhat.com> (raw)
In-Reply-To: <1458788142-17509-2-git-send-email-peterx@redhat.com>

[-- Attachment #1: Type: text/plain, Size: 2324 bytes --]

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.
> 
> Libvirt is possibly the first consumer of this new command.
> 
> 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 an
> ambiguous "QEMU boot failure" when trying to start the VM. This is not
> user-friendly.
> 
> 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 versions
> that we support, and filter out those not-supported ones.
> 
> For example, if we got the query result:
> 
> {"return": [{"emulated": false, "version": 3, "kernel": true},
>             {"emulated": true, "version": 2, "kernel": false}]}
> 
> Then it means that we support emulated GIC version 2 using:
> 
>   qemu-system-aarch64 -M virt,accel=tcg,gic-version=2 ...
> 
> or kvm-accelerated GIC version 3 using:
> 
>   qemu-system-aarch64 -M virt,accel=kvm,gic-version=3 ...

This helps - it shows how libvirt will map the query into qemu command
lines.

> 
> If we specify other explicit GIC version rather than the above, QEMU
> will not be able to boot.
> 
> 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 method
> is ready, we can move on to that one smoothly.
> 
> Signed-off-by: Peter Xu <peterx@redhat.com>
> ---

Interface looks fine from QMP perspective:
Reviewed-by: Eric Blake <eblake@redhat.com>

Libvirt should be able to cope with the information here, and
introspection will let us know if we ever expand the struct.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 604 bytes --]

  reply	other threads:[~2016-03-30  1:50 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-24  2:55 [Qemu-arm] [PATCH v7 0/4] ARM: add query-gic-capabilities QMP command Peter Xu
2016-03-24  2:55 ` [Qemu-devel] " Peter Xu
2016-03-24  2:55 ` [Qemu-arm] [PATCH v7 1/4] arm: qmp: add query-gic-capabilities interface Peter Xu
2016-03-24  2:55   ` [Qemu-devel] " Peter Xu
2016-03-30  1:50   ` Eric Blake [this message]
2016-03-30  1:50     ` Eric Blake
2016-03-24  2:55 ` [Qemu-devel] [PATCH v7 2/4] arm: enhance kvm_arm_create_scratch_host_vcpu Peter Xu
2016-03-24  9:13   ` [Qemu-arm] " Sergey Fedorov
2016-03-24  9:13     ` [Qemu-devel] " Sergey Fedorov
2016-03-29 20:04   ` [Qemu-arm] " Peter Maydell
2016-03-29 20:04     ` [Qemu-devel] " Peter Maydell
2016-03-24  2:55 ` [Qemu-arm] [PATCH v7 3/4] kvm: add kvm_device_supported() helper function Peter Xu
2016-03-24  2:55   ` [Qemu-devel] " Peter Xu
2016-03-24  9:14   ` [Qemu-arm] " Sergey Fedorov
2016-03-24  9:14     ` [Qemu-devel] " Sergey Fedorov
2016-03-24  2:55 ` [Qemu-arm] [PATCH v7 4/4] arm: implement query-gic-capabilities Peter Xu
2016-03-24  2:55   ` [Qemu-devel] " Peter Xu
2016-03-24  9:16   ` [Qemu-arm] " Sergey Fedorov
2016-03-24  9:16     ` [Qemu-devel] " Sergey Fedorov
2016-03-29 20:10 ` [Qemu-arm] [PATCH v7 0/4] ARM: add query-gic-capabilities QMP command Peter Maydell
2016-03-29 20:10   ` [Qemu-devel] " Peter Maydell
2016-03-30 11:20   ` [Qemu-arm] " Andrea Bolognani
2016-03-30 11:20     ` Andrea Bolognani
2016-03-30 14:53 ` [Qemu-arm] " Peter Maydell
2016-03-30 14:53   ` [Qemu-devel] " Peter Maydell

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=56FB30DB.3040607@redhat.com \
    --to=eblake@redhat.com \
    --cc=abologna@redhat.com \
    --cc=armbru@redhat.com \
    --cc=christoffer.dall@linaro.org \
    --cc=drjones@redhat.com \
    --cc=libvir-list@redhat.com \
    --cc=mdroth@linux.vnet.ibm.com \
    --cc=peter.maydell@linaro.org \
    --cc=peterx@redhat.com \
    --cc=qemu-arm@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    /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.