On 7/29/19 10:23 AM, Changlimin wrote:
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) {
Thanks for your report. I've proposed patches here:
https://www.redhat.com/archives/libvir-list/2019-July/msg01902.html
However, if you want to use those PCI devices with QEMU, it will need
some patching too. For instance, the similar limitation is to be found
in set_pci_host_devaddr().
Michal