Re: [Xen-devel] [PATCH XEN v6 25/32] tools/libs/gnttab: Extensive updates to API documentation.

2015-12-14 Thread Ian Jackson
Ian Campbell writes ("Re: [Xen-devel] [PATCH XEN v6 25/32] tools/libs/gnttab: Extensive updates to API documentation."): > So I think at least call, foreignmemory and gnttab need a > restriction/caveat like the above, which is that on fork but not exec you > can call close

Re: [Xen-devel] [PATCH XEN v6 25/32] tools/libs/gnttab: Extensive updates to API documentation.

2015-12-14 Thread Ian Campbell
On Fri, 2015-12-11 at 17:35 +, Ian Campbell wrote: > On Fri, 2015-12-11 at 17:19 +, Ian Jackson wrote: > > Ian Campbell writes ("Re: [Xen-devel] [PATCH XEN v6 25/32] > > tools/libs/gnttab: Extensive updates to API documentation."): > > > I'm curr

Re: [Xen-devel] [PATCH XEN v6 25/32] tools/libs/gnttab: Extensive updates to API documentation.

2015-12-11 Thread Ian Campbell
On Fri, 2015-12-11 at 17:19 +, Ian Jackson wrote: > Ian Campbell writes ("Re: [Xen-devel] [PATCH XEN v6 25/32] > tools/libs/gnttab: Extensive updates to API documentation."): > > I'm currently intending to write something very similar for each of the &g

Re: [Xen-devel] [PATCH XEN v6 25/32] tools/libs/gnttab: Extensive updates to API documentation.

2015-12-11 Thread Ian Jackson
Ian Campbell writes ("Re: [Xen-devel] [PATCH XEN v6 25/32] tools/libs/gnttab: Extensive updates to API documentation."): > I'm currently intending to write something very similar for each of the > xen*_open (gntshr, gnttab, foreignmemory, evtchn and probably call too) > f

Re: [Xen-devel] [PATCH XEN v6 25/32] tools/libs/gnttab: Extensive updates to API documentation.

2015-12-11 Thread Ian Campbell
On Wed, 2015-12-09 at 17:08 +, Ian Campbell wrote: > On Wed, 2015-12-09 at 16:28 +, Ian Jackson wrote: > > Ian Campbell writes ("Re: [PATCH XEN v6 25/32] tools/libs/gnttab: > > Extensive updates to API documentation."): > > > On Wed, 2015-12-09 at 16:09 +, Ian Jackson wrote: > > > > Is

Re: [Xen-devel] [PATCH XEN v6 25/32] tools/libs/gnttab: Extensive updates to API documentation.

2015-12-09 Thread Ian Campbell
On Wed, 2015-12-09 at 16:28 +, Ian Jackson wrote: > Ian Campbell writes ("Re: [PATCH XEN v6 25/32] tools/libs/gnttab: > Extensive updates to API documentation."): > > On Wed, 2015-12-09 at 16:09 +, Ian Jackson wrote: > > > Is this actually true ?  Normally close() on an fd does not munmap >

Re: [Xen-devel] [PATCH XEN v6 25/32] tools/libs/gnttab: Extensive updates to API documentation.

2015-12-09 Thread Ian Campbell
On Wed, 2015-12-09 at 16:09 +, Ian Jackson wrote: > > + * The child must open a new handle if they want to interact with > > + * gnttab. > >   * > > - * Return an fd onto the grant table driver.  Logs errors. > > + * A child may safely call xengnttab_close() on a xengnttab_handle > > + * inheri

Re: [Xen-devel] [PATCH XEN v6 25/32] tools/libs/gnttab: Extensive updates to API documentation.

2015-12-09 Thread Ian Jackson
Ian Campbell writes ("Re: [PATCH XEN v6 25/32] tools/libs/gnttab: Extensive updates to API documentation."): > On Wed, 2015-12-09 at 16:09 +, Ian Jackson wrote: > > Is this actually true ?  Normally close() on an fd does not munmap > > anything mmapped from the fd. > > Uh yes, I was talking r

Re: [Xen-devel] [PATCH XEN v6 25/32] tools/libs/gnttab: Extensive updates to API documentation.

2015-12-09 Thread Ian Jackson
Ian Campbell writes ("Re: [Xen-devel] [PATCH XEN v6 25/32] tools/libs/gnttab: Extensive updates to API documentation."): > On Wed, 2015-12-09 at 13:50 +, Andrew Cooper wrote: > > An _open() call must be matched with a _close() call. > > This is not safe after an

Re: [Xen-devel] [PATCH XEN v6 25/32] tools/libs/gnttab: Extensive updates to API documentation.

2015-12-09 Thread Ian Jackson
Ian Campbell writes ("[PATCH XEN v6 25/32] tools/libs/gnttab: Extensive updates to API documentation."): > In particular around error handling, behaviour on fork and the unmap > notification mechanism. > > Behaviour of xengnttab_map_*grant_refs and xengntshr_share_pages on > partial failure has b

Re: [Xen-devel] [PATCH XEN v6 25/32] tools/libs/gnttab: Extensive updates to API documentation.

2015-12-09 Thread Ian Campbell
On Wed, 2015-12-09 at 13:50 +, Andrew Cooper wrote: > On 09/12/15 13:00, Ian Campbell wrote: > > On Wed, 2015-12-09 at 12:41 +, Wei Liu wrote: > > > > + */ > > > > + > > > > +/* > > > >   * Grant Table Interface (making use of grants from other domains) > > > >   */ > > > >   > > > >  typed

Re: [Xen-devel] [PATCH XEN v6 25/32] tools/libs/gnttab: Extensive updates to API documentation.

2015-12-09 Thread Andrew Cooper
On 09/12/15 13:00, Ian Campbell wrote: > On Wed, 2015-12-09 at 12:41 +, Wei Liu wrote: >>> + */ >>> + >>> +/* >>> * Grant Table Interface (making use of grants from other domains) >>> */ >>> >>> typedef struct xengntdev_handle xengnttab_handle; >>> >>> /* >>> - * Note: >>> - * After f

Re: [Xen-devel] [PATCH XEN v6 25/32] tools/libs/gnttab: Extensive updates to API documentation.

2015-12-09 Thread Wei Liu
On Wed, Dec 09, 2015 at 01:00:34PM +, Ian Campbell wrote: > On Wed, 2015-12-09 at 12:41 +, Wei Liu wrote: > > > + */ > > > + > > > +/* > > >   * Grant Table Interface (making use of grants from other domains) > > >   */ > > >   > > >  typedef struct xengntdev_handle xengnttab_handle; > > >

Re: [Xen-devel] [PATCH XEN v6 25/32] tools/libs/gnttab: Extensive updates to API documentation.

2015-12-09 Thread Ian Campbell
On Wed, 2015-12-09 at 12:41 +, Wei Liu wrote: > > + */ > > + > > +/* > >   * Grant Table Interface (making use of grants from other domains) > >   */ > >   > >  typedef struct xengntdev_handle xengnttab_handle; > >   > >  /* > > - * Note: > > - * After fork a child process must not use any open

Re: [Xen-devel] [PATCH XEN v6 25/32] tools/libs/gnttab: Extensive updates to API documentation.

2015-12-09 Thread Wei Liu
On Thu, Dec 03, 2015 at 11:22:22AM +, Ian Campbell wrote: [...] > + * connection, connected, etc). > + * > + * Both ends are permitted to modify (including clear) their > + * respective status bytes and to signal the event channel themselves > + * from userspace. > + * > + * Depending on the me

Re: [Xen-devel] [PATCH XEN v6 25/32] tools/libs/gnttab: Extensive updates to API documentation.

2015-12-04 Thread Ian Campbell
On Thu, 2015-12-03 at 13:08 -0500, Daniel De Graaf wrote: > On 03/12/15 06:22, Ian Campbell wrote: > > In particular around error handling, behaviour on fork and the unmap > > notification mechanism. > > > > Behaviour of xengnttab_map_*grant_refs and xengntshr_share_pages on > > partial failure ha

Re: [Xen-devel] [PATCH XEN v6 25/32] tools/libs/gnttab: Extensive updates to API documentation.

2015-12-03 Thread Daniel De Graaf
On 03/12/15 06:22, Ian Campbell wrote: In particular around error handling, behaviour on fork and the unmap notification mechanism. Behaviour of xengnttab_map_*grant_refs and xengntshr_share_pages on partial failure has been confirmed/inferred (by inspection) on Linux and Mini-os (the only two k

[Xen-devel] [PATCH XEN v6 25/32] tools/libs/gnttab: Extensive updates to API documentation.

2015-12-03 Thread Ian Campbell
In particular around error handling, behaviour on fork and the unmap notification mechanism. Behaviour of xengnttab_map_*grant_refs and xengntshr_share_pages on partial failure has been confirmed/inferred (by inspection) on Linux and Mini-os (the only two known implementations. Likewise the behavi