]> git.ipfire.org Git - thirdparty/libvirt.git/commit
conf: auto-add a pcie-root-port when needed while plugging in pcie-to-pci-bridge
authorLaine Stump <laine@redhat.com>
Mon, 25 Aug 2025 03:32:39 +0000 (23:32 -0400)
committerLaine Stump <laine@redhat.com>
Wed, 10 Sep 2025 17:12:41 +0000 (13:12 -0400)
commit96d1bfee3eb5ed1d87901c443131d77b7f2fd10d
treed43664f9f1364c22079fea2b4a37f5b19e6515ca
parent698aea684a060079ed42535eb93efefa8ac7606f
conf: auto-add a pcie-root-port when needed while plugging in pcie-to-pci-bridge

This will almost surely never come up during any normal operation[*],
which is likely why this wasn't done when pcie-to-pci-bridge support
was added back in the before-fore times. It's pretty simple to support
though - a pcie-to-pci-bridge plugs into a pcie-root-port just like
any other pcie device, and if there isn't an open slot on an existing
pcie-root-port, we can just add one.

([*] in real life, a pcie-to-pci-bridge is only auto-added by libvirt
itself, while this function is dealing with the followup to *user
added* devices. Also each pcie-to-pci-bridge has 32 slots, and it's
unlikely a domain with pcie support would be wanting more than 32
conventional PCI (i.e. not PCIe) devices)

Signed-off-by: Laine Stump <laine@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
src/conf/domain_addr.c