Signed-off-by: Ian Campbell <ian.campb...@citrix.com>
Acked-by: Wei Liu <wei.l...@citrix.com>
---
v6: Also discuss recovering the memory.
---
 tools/libs/foreignmemory/include/xenforeignmemory.h | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)

diff --git a/tools/libs/foreignmemory/include/xenforeignmemory.h 
b/tools/libs/foreignmemory/include/xenforeignmemory.h
index 87f72fd..f4b4d76 100644
--- a/tools/libs/foreignmemory/include/xenforeignmemory.h
+++ b/tools/libs/foreignmemory/include/xenforeignmemory.h
@@ -32,13 +32,24 @@ typedef struct xentoollog_logger xentoollog_logger;
 typedef struct xenforeignmemory_handle xenforeignmemory_handle;
 
 /*
- * Return a handle onto the hypercall driver.  Logs errors.
+ * Return a handle onto the foreign memory mapping driver.  Logs errors.
+ *
+ * A child may safely call xenforeignmemory_close() on a
+ * xenforeignmemory_handle inherited from a parent and this will
+ * safely reclaim any virtual address space used by mappings
+ * associated with that handle.
+ *
+ * Calling xenforeignmemory_close() is the only safe operation on a
+ * xenforeignmemory_handle which has been inherited.
  */
 xenforeignmemory_handle *xenforeignmemory_open(xentoollog_logger *logger,
                                                unsigned open_flags);
 
 /*
  * Close a handle previously allocated with xenforeignmemory_open().
+ *
+ * This is the only function which may be safely called on a
+ * xenforeignmemory_handle in a child after a fork.
  */
 int xenforeignmemory_close(xenforeignmemory_handle *xmem);
 
-- 
2.1.4


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

Reply via email to