[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



At 06/03/2011 10:07 PM, Eric Blake Write:
> 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)?

at least.

> 
>> @@ -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

Yes, it is a bad test. But I do not find a better way.

> where possible, and instead favor -help parsing tests.  Is there any
> device xxx where 'qemu -device xxx,?' will list multifunction?  If so,

No, for example:
# /usr/local2/bin/qemu-system-x86_64 -device rtl8139,?
rtl8139.mac=macaddr
rtl8139.vlan=vlan
rtl8139.netdev=netdev
rtl8139.bootindex=int32


> qemuCapsExtractDeviceStr is the better place to modify to probe for this
> capability.
> 


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