提交 7118bdee 编写于 作者: L Laine Stump

conf: during PCI hotplug, require that the controller support hotplug

Before this patch we would simply rely on QEMU failing to attach the
device. Since we have a flag in the address set telling us which
controllers support hotplug, we can fail the operation sooner.

This also assures that when hotplugging with no provided PCI address,
that we skip any controllers with hotplug='off', and attempt to assign
the device to a controller that not only supports hotplug, but also
has it enabled.
Signed-off-by: NLaine Stump <laine@redhat.com>
Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
上级 a283189f
...@@ -931,6 +931,11 @@ virDomainPCIAddressEnsureAddr(virDomainPCIAddressSetPtr addrs, ...@@ -931,6 +931,11 @@ virDomainPCIAddressEnsureAddr(virDomainPCIAddressSetPtr addrs,
if (!flags) if (!flags)
return 0; return 0;
/* This function is only called during hotplug, so we require hotplug
* support from the controller.
*/
flags |= VIR_PCI_CONNECT_HOTPLUGGABLE;
if (!(addrStr = virPCIDeviceAddressAsString(&dev->addr.pci))) if (!(addrStr = virPCIDeviceAddressAsString(&dev->addr.pci)))
return -1; return -1;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册