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

Re: [Xen-devel] [PATCH XEN v5 09/23] tools: Refactor hypercall calling wrappers into libxencall.



On Wed, 2015-11-11 at 15:31 +0000, Wei Liu wrote:
> On Wed, Nov 11, 2015 at 03:08:13PM +0000, Ian Jackson wrote:
> > Ian Campbell writes ("[PATCH XEN v5 09/23] tools: Refactor hypercall
> > calling wrappers into libxencall."):
> > > libxencall will provide a stable API and ABI for calling hypercalls
> > > (although those hypercalls themselves may not have a stable API). As
> > > well as the hypercall buffer infrastructure needed in order to safely
> > > provide pointer arguments to hypercalls.
> > ...
> > > +/*
> > > + * This library allows you to make arbitrary hypercalls (subject to
> > > + * sufficient permission for the process and the domain itself).
> > > Note
> > > + * that while the library interface is stable the hypercalls are
> > > + * subject to their own rules.
> > 
> > Something needs to say what the error handling is like.
> > 
> > Do these functions set errno ?
> > 
> > > +/*
> > > + * Call hypercalls with varying numbers of arguments.
> > > + */
> > > +int xencall0(xencall_handle *xcall, unsigned int op);
> > 
> > Is the return value the raw hypercall return value, or is hypervisor
> > do_foo returning -EFOOBAR turned into to -1/errno=EFOOBAR ?
> > (Hopefully the answer to this doesn't depend on the hypercall ABI...)
> > 
> 
> That is -1/errno=E_XEN_FOOBAR across all OSes.
> 
> (I think this stems from Linux ioctl semantics. Then NetBSD etc follow
> suit.)

I wish it were that simple :-(


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