mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-24 22:55:23 +00:00
conf: check HOTPLUGGABLE connect flag when validating a PCI address
The HOTPLUGGABLE flag is set for appropriates buses in a PCI address set, and thnis patch updates virDomainPCIAddressFlagsCompatible() to check the HOTPLUGGABLE flag when searching for a suitable bus/slot for a device. No devices request HOTPLUGGABLE though (yet), so there is no observable effect. Signed-off-by: Laine Stump <laine@redhat.com> Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
parent
aa15e9259f
commit
a283189f8c
@ -376,6 +376,18 @@ virDomainPCIAddressFlagsCompatible(virPCIDeviceAddressPtr addr,
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ((devFlags & VIR_PCI_CONNECT_HOTPLUGGABLE) &&
|
||||||
|
!(busFlags & VIR_PCI_CONNECT_HOTPLUGGABLE)) {
|
||||||
|
if (reportError) {
|
||||||
|
virReportError(errType,
|
||||||
|
_("The device at PCI address %s requires "
|
||||||
|
"hotplug capability, but the PCI controller "
|
||||||
|
"with index='%d' doesn't support hotplug"),
|
||||||
|
addrStr, addr->bus);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
/* If this bus doesn't allow the type of connection (PCI
|
/* If this bus doesn't allow the type of connection (PCI
|
||||||
* vs. PCIe) required by the device, or if the device requires
|
* vs. PCIe) required by the device, or if the device requires
|
||||||
* hot-plug and this bus doesn't have it, return false.
|
* hot-plug and this bus doesn't have it, return false.
|
||||||
|
Loading…
Reference in New Issue
Block a user