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

Re: [Xen-devel] [PATCH v2 COLOPre 06/13] tools/libxl: Introduce a new internal API libxl__domain_unpause()



On Thu, 2015-06-11 at 17:09 +0800, Wen Congyang wrote:
> On 06/11/2015 04:43 PM, Ian Campbell wrote:
> > On Thu, 2015-06-11 at 10:21 +0800, Yang Hongyang wrote:
> >>
> >> On 06/10/2015 11:37 PM, Ian Campbell wrote:
> >>> On Mon, 2015-06-08 at 11:43 +0800, Yang Hongyang wrote:
> >>>> From: Wen Congyang <wency@xxxxxxxxxxxxxx>
> >>>>
> >>>> The guest is paused after libxl_domain_create_restore().
> >>>> Secondary vm is running in colo mode. So we need to unpause
> >>>> the guest. The current API libxl_domain_unpause() is
> >>>> not an internal API. Introduce a new API to support it.
> >>>> No functional change.
> >>>
> >>> In general there is nothing wrong with using a public function
> >>> internally. Is there some special consideration here?
> >>
> >> It's just that we thought it's better to use internal functions for
> >> internal purpose.
> >> Most the public functions take ctx as the first param, the internal 
> >> functions
> >> take gc/egc as the first param(although we can get ctx from gcs and call
> >> public functions when needed).
> >> If it doesn't matter, we can drop this patch.
> > 
> > It doesn't matter so you can, yes.
> 
> If the public API creates a new AO, it is safe to call it directly?

A public function which takes an ao_how is, I believe, an exception to
this rule and should be annotated with LIBXL_EXTERNAL_CALLERS_ONLY to
prevent accidents.

I don't think libxl_domain_unpause is such a function though.

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®.