[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [libvirt] [PATCH v7 1/4] arm: qmp: add query-gic-capabilities interface



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: signature.asc
Description: OpenPGP digital signature


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]