}
}
+ /*
+ * Normally PCI addresses are assigned in the virDomainCreate
+ * or virDomainDefine methods. We might still need to assign
+ * some here to cope with the question of upgrades. Regardless
+ * we also need to populate the PCI address set cache for later
+ * use in hotplug
+ */
+ if (virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_DEVICE)) {
+ VIR_DEBUG("Assigning domain PCI addresses");
+ if ((qemuDomainAssignAddresses(vm->def, priv->qemuCaps, vm)) < 0)
+ goto cleanup;
+ }
+
if (qemuAssignDeviceAliases(vm->def, priv->qemuCaps) < 0)
goto cleanup;
priv->monStart = 0;
priv->gotShutdown = false;
- /*
- * Normally PCI addresses are assigned in the virDomainCreate
- * or virDomainDefine methods. We might still need to assign
- * some here to cope with the question of upgrades. Regardless
- * we also need to populate the PCI address set cache for later
- * use in hotplug
- */
- if (virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_DEVICE)) {
- VIR_DEBUG("Assigning domain PCI addresses");
- if ((qemuDomainAssignAddresses(vm->def, priv->qemuCaps, vm)) < 0)
- goto cleanup;
- }
-
ret = 0;
cleanup:
VIR_FREE(nodeset);
virQEMUCapsFilterByMachineType(extraFlags, vm->def->os.machine);
- if (qemuDomainAssignAddresses(vm->def, extraFlags, NULL)) {
- if (flags & FLAG_EXPECT_FAILURE)
- goto ok;
- goto out;
- }
-
log = virtTestLogContentAndReset();
VIR_FREE(log);
virResetLastError();