[libvirt] [PATCH] Fix disability to run on systems with no PCI bus

Michal Prívozník mprivozn at redhat.com
Fri Apr 22 09:00:03 UTC 2011


On 04/22/2011 10:19 AM, Jiri Denemark wrote:
> On Fri, Apr 22, 2011 at 09:58:38 +0200, Michal Privoznik wrote:
>> The patch which moved libpciaccess initialization to one place caused
>> regression - we were not able to run on system with no PCI bus, like
>> s390(x). This patch fix it.
>> ---
>>   src/node_device/node_device_udev.c |    6 ++++++
>>   1 files changed, 6 insertions(+), 0 deletions(-)
>>
>> diff --git a/src/node_device/node_device_udev.c b/src/node_device/node_device_udev.c
>> index 2139ef3..b6335ff 100644
>> --- a/src/node_device/node_device_udev.c
>> +++ b/src/node_device/node_device_udev.c
>> @@ -1603,7 +1603,13 @@ static int udevDeviceMonitorStartup(int privileged)
>>               char ebuf[256];
>>               VIR_ERROR(_("Failed to initialize libpciaccess: %s"),
>>                         virStrerror(pciret, ebuf, sizeof ebuf));
>> +#if defined __s390__ || defined __s390x_
>> +            /* On x390(x) system there is no PCI bus.
>> +             * Therefore we do not want to return error here */
>> +            ret = 0;
>> +#else
>>               ret = -1;
>> +#endif
>>               goto out;
>>           }
>>       }
>
> Why do we try to initialize libpciaccess if we know it won't succeed? What
> about just completely dropping libpciaccess dependency on s390(x)?
>
> Jirka

Well,
although investigation on the internet shows there is at least PCI-like 
bus, linux kernel doesn't know how to use it (see 
arch/s390/include/asm/pci.h) which is the most important. so NAK and 
prepare v2.

Michal




More information about the libvir-list mailing list