Description of problem
A PCIe device should be pluggable into a pcie-root-port using the following combination of options:
hotplug_vfio_on_root_bus = true
pcie_root_port = 2
However, doing so with devices connected to root-ports in the host fails with:
Bus 'pcie.0' does not support hotplugging: OCI runtime error
The reason is that isPCIeDevice looks at /sys/bus/pci/slots to determine whether the device is PCIe based on the slot reported speed.
This mechanism is not generic enough and fails to recognize devices that are connected to root-ports such as:
$ lspci -t
[...]
+-[0000:64]-+-00.0-[65-66]--+-00.0 Intel Corporation Ethernet Controller X710 for 10GbE SFP+
| | \-00.1 Intel Corporation Ethernet Controller X710 for 10GbE SFP+
[...]
$ lspci -s 000:64:00.0
64:00.0 PCI bridge: Intel Corporation Sky Lake-E PCI Express Root Port A (rev 04)
$ cat /sys/bus/pci/slots/2/{address,max_bus_speed}
0000:64:00
Unknown
Expected result
Hotplug into pcie-root-port should work
Actual result
Devices are not plugged into pcie-root-ports. In q35 this means kata tries to plug them into the root bus, which does not support hot-plugging and the following error message is shown:
However, doing so with devices connected to root-ports in the host fails with:
Bus 'pcie.0' does not support hotplugging: OCI runtime error
Description of problem
A PCIe device should be pluggable into a pcie-root-port using the following combination of options:
However, doing so with devices connected to root-ports in the host fails with:
The reason is that isPCIeDevice looks at /sys/bus/pci/slots to determine whether the device is PCIe based on the slot reported speed.
This mechanism is not generic enough and fails to recognize devices that are connected to root-ports such as:
Expected result
Hotplug into pcie-root-port should work
Actual result
Devices are not plugged into pcie-root-ports. In q35 this means kata tries to plug them into the root bus, which does not support hot-plugging and the following error message is shown:
However, doing so with devices connected to root-ports in the host fails with: