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

Re: [Xen-devel] [PATCH v2 15/18] libxl: introduce libxl_retrieve_domain_configuration



On Wed, Aug 27, 2014 at 03:13:52AM +0100, Ian Campbell wrote:
> On Wed, 2014-07-30 at 19:23 +0100, Wei Liu wrote:
> > +    /* Domain name */
> 
> > +    /* Domain UUID */
> 
> Wasn't there a new libxl__update_domain_configuration which does a bunch
> of this for you already?
> 

It updates UUID in JSON config but not domain name. I would still prefer
to use xenstore as primary reference for information like domain name
and UUID etc.

> > +        /* "target" */
> > +        rc = libxl_get_memory_target(ctx, domid, &memory);
> > +        if (rc) {
> > +            LOG(ERROR, "fail to get memory target for domain %d", domid);
> > +            goto out;
> > +        }
> > +        /* If the domain is HVM domain, target memory in xenstore is
> > +         * smaller than what user has asked for. The difference is
> > +         * video_memkb, so add it back. Otherwise domain rebuild will
> > +         * fail.
> 
> Ahem, lovely. Could you add a note at the point on creation where the
> opposite happens pointing here for the benefit of anyone who touched
> it...
> 

Sure, I will see what I can do.

> > +         */
> > +        if (d_config->b_info.type == LIBXL_DOMAIN_TYPE_HVM)
> > +            d_config->b_info.target_memkb =
> > +                memory + d_config->b_info.video_memkb;
> > +
> > +        /* "static-max" */
> > +        rc = libxl_get_memory_static_max(ctx, domid, &memory);
> 
> This and the libxl_get_memory_target are implemented in terms of a very
> handy internal helper that you added which returns both at the same
> time ;-)
> 

Yes I can use that internal function to do this.

Wei.

> Ian.

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.