On Tue, 29 Mar 2011 13:17:55 +0800 Wen Congyang <wency@xxxxxxxxxxxxxx> wrote: > At 03/29/2011 12:32 PM, KAMEZAWA Hiroyuki Write: > > On Tue, 29 Mar 2011 11:24:23 +0800 > > Wen Congyang <wency@xxxxxxxxxxxxxx> wrote: > > Hmm ? I'll add a spec. on qemuDomainAt(De)tachDevicePersistent() to > > never update vmdef when return !0. Is it ok ? > > No. > In patch 2, the function qemuDomainDeviceAddressFixup() may modify vmdef > and return -1: > ============= > +static int qemuDomainDeviceAddressFixup(virDomainDefPtr vmdef, bool pci) > +{ > + if (!pci && virDomainDefAddImplicitControllers(vmdef)) > + return -1; > + /* added controller requires PCI address */ > + return qemuDomainAssignPCIAddresses(vmdef); > +} > + > ============= > The function virDomainDefAddImplicitControllers() may modify vmdef. If > qemuDomainAssignPCIAddresses() failed, there is no way to rollback the > operation that virDomainDefAddImplicitControllers() do. > Of course, I'll add a rollback. That's a bug in patch'2', not here. Thanks, -Kame -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list