[libvirt] [PATCH v5 3/4] qemu: Build correct command line for PCI NICs on ARM

Cole Robinson crobinso at redhat.com
Mon Aug 10 23:26:56 UTC 2015


On 08/10/2015 12:29 PM, Laine Stump wrote:
> On 07/17/2015 07:27 AM, Pavel Fedin wrote:
>> Legacy -net option works correctly only with embedded device models, which
>> do not require any bus specification. Therefore, we should use -device for
>> PCI hardware
> 
> This function is starting to look a bit like a hack on top of a hack on
> top of a hack. Are the original reasons for using -net instead of
> -device on certain arches still applicable?
> 

Yes, the old logic is still needed for all non-virtio uses of arm and aarch64,
and potentially a ton of other qemu architectures if we ever wanted to
properly support them.

- Cole

> 
>>
>> Signed-off-by: Pavel Fedin <p.fedin at samsung.com>
>> ---
>>  src/qemu/qemu_command.c | 3 ++-
>>  1 file changed, 2 insertions(+), 1 deletion(-)
>>
>> diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
>> index 42906a8..5569be6 100644
>> --- a/src/qemu/qemu_command.c
>> +++ b/src/qemu/qemu_command.c
>> @@ -457,7 +457,8 @@ qemuDomainSupportsNicdev(virDomainDefPtr def,
>>      /* non-virtio ARM nics require legacy -net nic */
>>      if (((def->os.arch == VIR_ARCH_ARMV7L) ||
>>          (def->os.arch == VIR_ARCH_AARCH64)) &&
>> -        net->info.type != VIR_DOMAIN_DEVICE_ADDRESS_TYPE_VIRTIO_MMIO)
>> +        net->info.type != VIR_DOMAIN_DEVICE_ADDRESS_TYPE_VIRTIO_MMIO &&
>> +        net->info.type != VIR_DOMAIN_DEVICE_ADDRESS_TYPE_PCI)
>>          return false;
>>  
>>      return true;
> 




More information about the libvir-list mailing list