Le 14/12/2011 21:56, Paul H. Hargrove a écrit : > Now that I think of it, this situation seems to imply that running the > code in topology-libpci.c as root on a system w/ a Intel PIIX4 > controller could lock-up ones machine. Thoughts?
I can't know for sure. I would be surprised if sudo lspci -xxx could lockup an entire machine. If it was that dangerous, I hope that the kernel guys would have added a quirk for this device to prevent people from killing the machine. What do they mean with "random location" in the comment ? Something between 64 and 256 ? Or something really random after 256 ? FWIW, I increased the cached config space from 64 bytes to 256 when adding support for getting the pcie link speed, which is indeed only available to root (extended pcie capability). The attached patch might work. I am not sure all this is actually necessary because things have been working fine so far, apart from your warnings. By the way, does lstopo show PCI devices on your machine even when you have these warnings? Brice
diff --git a/src/topology-libpci.c b/src/topology-libpci.c index 4564319..01f8e03 100644 --- a/src/topology-libpci.c +++ b/src/topology-libpci.c @@ -560,6 +560,11 @@ hwloc_pci_error(char *msg, ...) longjmp(err_buf, 1); } +static void +hwloc_pci_warning(char *msg __hwloc_attribute_unused, ...) +{ +} + void hwloc_look_libpci(struct hwloc_topology *topology) { @@ -576,6 +581,7 @@ hwloc_look_libpci(struct hwloc_topology *topology) pciaccess = pci_alloc(); pciaccess->error = hwloc_pci_error; + pciaccess->warning = hwloc_pci_warning; if (setjmp(err_buf)) { pci_cleanup(pciaccess);