[libvirt] PCI domain space need be enlarge to support domain great than FFFF

Changlimin changlimin at h3c.com
Mon Jul 29 08:23:28 UTC 2019


For some servers, PCI domain is great than FFFF

# lspci
10000:00:00.0 PCI bridge: Intel Corporation Sky Lake-E PCI Express Root Port A (rev 04)
10000:00:01.0 PCI bridge: Intel Corporation Sky Lake-E PCI Express Root Port B (rev 04)
10000:00:02.0 PCI bridge: Intel Corporation Sky Lake-E PCI Express Root Port C (rev 04)
10000:00:03.0 PCI bridge: Intel Corporation Sky Lake-E PCI Express Root Port D (rev 04)
10000:01:00.0 Non-Volatile memory controller: Samsung Electronics Co Ltd NVMe SSD Controller SM961/PM961
10000:02:00.0 Non-Volatile memory controller: Samsung Electronics Co Ltd NVMe SSD Controller SM961/PM961

So some code need to match the larger domain.

#define PCI_ADDR_LEN 13 /* "XXXX:XX:XX.X" */

snprintf(dev->name, sizeof(dev->name), "%.4x:%.2x:%.2x.%.1x",
                 domain, bus, slot, function)

if (addr->domain > 0xFFFF) {

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20190729/17f018f5/attachment-0001.htm>


More information about the libvir-list mailing list