[libvirt] [PATCH v3 1/3] Introduce QEMU_CAPS_ARM_VIRT_PCI
Peter Krempa
pkrempa at redhat.com
Tue Jul 7 07:36:00 UTC 2015
On Mon, Jul 06, 2015 at 15:59:25 +0300, Pavel Fedin wrote:
> This capability specifies that "virt" machine on ARM has PCI controller.
> Enabled when qemu version is at least 2.3.0.
>
> Signed-off-by: Pavel Fedin <p.fedin at samsung.com>
> ---
> src/qemu/qemu_capabilities.c | 5 +++++
> src/qemu/qemu_capabilities.h | 1 +
> 2 files changed, 6 insertions(+)
>
> diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c
> index 27686c3..0dc034f 100644
> --- a/src/qemu/qemu_capabilities.c
> +++ b/src/qemu/qemu_capabilities.c
...
> @@ -3352,6 +3353,10 @@ virQEMUCapsInitQMPMonitor(virQEMUCapsPtr qemuCaps,
> qemuCaps->version >= 2003000)
> virQEMUCapsSet(qemuCaps, QEMU_CAPS_CPU_AARCH64_OFF);
>
> + /* 'virt' machine has PCI controller from v2.3.0 onwards */
> + if (qemuCaps->version >= 2003000)
> + virQEMUCapsSet(qemuCaps, QEMU_CAPS_ARM_VIRT_PCI);
Is there a way how we could detect this according to the actual presence
of the PCI bus for the ARM machine? A certain device type that can be
queried rather than relying on a version check.
(see virQEMUCapsObjectTypes[] and other similar arrays in
src/qemu/qemu_caps.c)
Generally the approach is to use a specific device check to set
capabilities for anything where it's possible since it's robust against
backports of given functionality to previous versions.
> +
> /* vhost-user supports multi-queue from v2.4.0 onwards,
> * but there is no way to query for that capability */
> if (qemuCaps->version >= 2004000)
Peter
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20150707/6c84822b/attachment-0001.sig>
More information about the libvir-list
mailing list