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

Re: [libvirt] [PATCH 1/7] check whether qemu supports multi function PCI device



On 05/27/2011 04:19 AM, Wen Congyang wrote:
> qemu supports multi function PCI device after version 0.13.0.

After (> 0.13.0) or at least (>= 0.13.0)?

> @@ -1024,6 +1026,9 @@ qemuCapsComputeCmdFlags(const char *help,
>       */
>       if (version >= 13000)
>          qemuCapsSet(flags, QEMU_CAPS_MONITOR_JSON);
> +
> +    if (version >= 13000)
> +        qemuCapsSet(flags, QEMU_CAPS_PCI_MULTIFUNCTION);

This is a rather bad test.  We should be avoiding version-based tests
where possible, and instead favor -help parsing tests.  Is there any
device xxx where 'qemu -device xxx,?' will list multifunction?  If so,
qemuCapsExtractDeviceStr is the better place to modify to probe for this
capability.

-- 
Eric Blake   eblake redhat com    +1-801-349-2682
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]