Re: [PATCH v2 4/4] qemu: Add check for PCI bridge placement if there are too many PCI devices

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

 



On 01/23/2015 02:38 PM, Ján Tomko wrote:

>> diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
>> index a3dedbf..870771f 100644
>> --- a/src/qemu/qemu_command.c
>> +++ b/src/qemu/qemu_command.c
>> @@ -1982,6 +1982,25 @@ qemuDomainAssignPCIAddresses(virDomainDefPtr def,
>>              if (qemuAssignDevicePCISlots(def, qemuCaps, addrs) < 0)
>>                  goto cleanup;
>>          }
>> +
>> +        for (i = 0; i < def->ncontrollers; i++) {
>> +            /* check if every PCI bridge controller's ID is greater than
>> +             * the bus it is placed onto
>> +             */
>> +            virDomainControllerDefPtr cont = def->controllers[i];
>> +            int idx = cont->idx;
>> +            int bus = cont->info.addr.pci.bus;
>> +            if (cont->type == VIR_DOMAIN_CONTROLLER_TYPE_PCI &&
>> +                cont->model == VIR_DOMAIN_CONTROLLER_MODEL_PCI_BRIDGE &&
>> +                idx <= bus) {
>> +                virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
>> +                               _("failed to create PCI bridge "
>> +                                 "on bus %d: too many devices with fixed "
>> +                                 "addresses"),
>> +                               bus);
>> +                goto cleanup;
>> +            }
>> +        }
>>      }
>>  
>>      if (obj && obj->privateData) {
>>
> 
> I have moved the check into if (qemuDomainSupportsPCI) and pushed the patch.
> 
> Jan
> 

Thank you.
Erik

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list





[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]