I'm attempting to solve the issue reported here: https://gitlab.com/libvirt/libvirt/-/issues/345 Hoping the originator of virHostdevDeleteMissingPCIDevices() will be able to comment, as I am still trying to reproduce the issue with additional debug in place. diff --git a/src/hypervisor/virhostdev.c b/src/hypervisor/virhostdev.c index c0ce867596..d43354963e 100644 --- a/src/hypervisor/virhostdev.c +++ b/src/hypervisor/virhostdev.c @@ -1101,11 +1101,11 @@ virHostdevReAttachPCIDevices(virHostdevManager *mgr, VIR_ERROR(_("Failed to allocate PCI device list: %s"), virGetLastErrorMessage()); virResetLastError(); - return; } - - virHostdevReAttachPCIDevicesImpl(mgr, drv_name, dom_name, pcidevs, - hostdevs, nhostdevs); + else { + virHostdevReAttachPCIDevicesImpl(mgr, drv_name, dom_name, pcidevs, + hostdevs, nhostdevs); + } /* Handle the case where PCI devices from the host went missing * during the domain lifetime */