[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v7 1/4] arm: qmp: add query-gic-capabilities int
From: |
Eric Blake |
Subject: |
Re: [Qemu-devel] [PATCH v7 1/4] arm: qmp: add query-gic-capabilities interface |
Date: |
Tue, 29 Mar 2016 19:50:19 -0600 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.7.1 |
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 <address@hidden>
> ---
Interface looks fine from QMP perspective:
Reviewed-by: Eric Blake <address@hidden>
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
signature.asc
Description: OpenPGP digital signature
- [Qemu-devel] [PATCH v7 0/4] ARM: add query-gic-capabilities QMP command, Peter Xu, 2016/03/23
- [Qemu-devel] [PATCH v7 1/4] arm: qmp: add query-gic-capabilities interface, Peter Xu, 2016/03/23
- Re: [Qemu-devel] [PATCH v7 1/4] arm: qmp: add query-gic-capabilities interface,
Eric Blake <=
- [Qemu-devel] [PATCH v7 2/4] arm: enhance kvm_arm_create_scratch_host_vcpu, Peter Xu, 2016/03/23
- [Qemu-devel] [PATCH v7 3/4] kvm: add kvm_device_supported() helper function, Peter Xu, 2016/03/23
- [Qemu-devel] [PATCH v7 4/4] arm: implement query-gic-capabilities, Peter Xu, 2016/03/23
- Re: [Qemu-devel] [PATCH v7 0/4] ARM: add query-gic-capabilities QMP command, Peter Maydell, 2016/03/29
- Re: [Qemu-devel] [PATCH v7 0/4] ARM: add query-gic-capabilities QMP command, Peter Maydell, 2016/03/30