Re: [PATCH] reserve slot 1 on pci bus0

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

 



At 08/31/2011 06:28 AM, Eric Blake Write:
> On 08/23/2011 08:47 PM, Wen Congyang wrote:
>> After supporting multi function pci device, we only reserve function 1
>> on slot 1.
>> The user can use the other function on slot 1 in the xml config file.
>> We should
>> detect this wrong usage.
>>
>> ---
>>   src/qemu/qemu_command.c |   12 +++++++++---
>>   1 files changed, 9 insertions(+), 3 deletions(-)
>>
> 
>> @@ -1107,9 +1108,14 @@ qemuAssignDevicePCISlots(virDomainDefPtr def,
>> qemuDomainPCIAddressSetPtr addrs)
>>       /* PIIX3 (ISA bridge, IDE controller, something else unknown,
>> USB controller)
>>        * hardcoded slot=1, multifunction device
>>        */
>> -    if (!reservedIDE&&
>> -        qemuDomainPCIAddressReserveSlot(addrs, 1)<  0)
>> -        goto error;
>> +    for (function = 0; function<= QEMU_PCI_ADDRESS_LAST_FUNCTION;
>> function++) {
> 
> Isn't this an off-by-one?  Compare commit 7ae740fc.

Yes, it should be 'function < QEMU_PCI_ADDRESS_LAST_FUNCTION'

Thanks
Wen Congyang

> 

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