Re: [libvirt] PATCH: Support initial boot time CPU affinity mask

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, May 21, 2008 at 11:33:33AM -0400, Daniel Veillard wrote:
> On Fri, May 16, 2008 at 10:50:20PM +0100, Daniel P. Berrange wrote:
> > +    /* Extract domain vcpu info */
> > +    obj = xmlXPathEval(BAD_CAST "string(/domain/vcpu[1]/@cpuset)", ctxt);
> > +    if ((obj == NULL) || (obj->type != XPATH_STRING) ||
> > +        (obj->stringval == NULL) || (obj->stringval[0] == 0)) {
> > +        /* Allow use on all CPUS */
> > +        memset(def->cpumask, 1, QEMUD_CPUMASK_LEN);
> > +    } else {
> > +        char *set = (char *)obj->stringval;
> > +        memset(def->cpumask, 0, QEMUD_CPUMASK_LEN);
> > +        if (virParseCpuSet(conn, (const char **)&set,
> > +                           0, def->cpumask,
> > +                           QEMUD_CPUMASK_LEN) < 0) {
> > +            qemudReportError(conn, NULL, NULL, VIR_ERR_INTERNAL_ERROR,
> > +                             "%s", _("malformed vcpu mask information"));
> > +            goto error;
> > +        }
> > +    }
> > +    xmlXPathFreeObject(obj);
> 
>   virXPathString() would make it way cleaner IMHO

It definitely would - this entire funciton uses the old style direct
API calls and needs switching over.

>   Patch looks fine. Since we have migration nearly ready, it would be 
> interesting to check the combination of both at some point too,
> 
>   Looks fine to me, +1,

Thanks, I've committed this patch, including the bug Jim pointed out about
the unneccessary -S arg when using migrateFrom args

Regards,
Daniel
-- 
|: Red Hat, Engineering, Boston   -o-   http://people.redhat.com/berrange/ :|
|: http://libvirt.org  -o-  http://virt-manager.org  -o-  http://ovirt.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

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]