On Fri, Aug 13, 2010 at 05:26:45PM +0200, Jiri Denemark wrote: > When reconnecting to existing VMs, we re-reserved only those PCI > addresses which were explicitly mentioned in domain XML. Since some > addresses are always reserved (e.g., 0:0:0 and 0:0:1), we need to handle > those too. > > Also all this should only be done if device flag is supported by qemu. > --- > src/qemu/qemu_driver.c | 8 +++++--- > 1 files changed, 5 insertions(+), 3 deletions(-) > > diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c > index e718816..2ca3940 100644 > --- a/src/qemu/qemu_driver.c > +++ b/src/qemu/qemu_driver.c > @@ -1455,11 +1455,13 @@ qemuReconnectDomain(void *payload, const char *name ATTRIBUTE_UNUSED, void *opaq > if (qemudExtractVersionInfo(obj->def->emulator, > NULL, > &qemuCmdFlags) >= 0 && > - (qemuCmdFlags & QEMUD_CMD_FLAG_DEVICE)) > + (qemuCmdFlags & QEMUD_CMD_FLAG_DEVICE)) { > priv->persistentAddrs = 1; > > - if (!(priv->pciaddrs = qemuDomainPCIAddressSetCreate(obj->def))) > - goto error; > + if (!(priv->pciaddrs = qemuDomainPCIAddressSetCreate(obj->def)) || > + qemuAssignDevicePCISlots(obj->def, priv->pciaddrs) < 0) > + goto error; > + } > > if (driver->securityDriver && > driver->securityDriver->domainReserveSecurityLabel && ACK Daniel -- |: Red Hat, Engineering, London -o- http://people.redhat.com/berrange/ :| |: http://libvirt.org -o- http://virt-manager.org -o- http://deltacloud.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: GnuPG: 7D3B9505 -o- F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :| -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list