aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorJohn Levon <john.levon@nutanix.com>2021-01-20 10:00:17 +0000
committerGitHub <noreply@github.com>2021-01-20 10:00:17 +0000
commitfa5104150bca4182f8a38d39fa50f7e61982568e (patch)
tree7e7922e16150acdd01ac7b22ff1d07852befa78a /include
parent5aa56c58446c43f085da7ff6ca339d7361b8302d (diff)
downloadlibvfio-user-fa5104150bca4182f8a38d39fa50f7e61982568e.zip
libvfio-user-fa5104150bca4182f8a38d39fa50f7e61982568e.tar.gz
libvfio-user-fa5104150bca4182f8a38d39fa50f7e61982568e.tar.bz2
add whole-region mmap area for vfu_setup_region() (#225)
If an fd is provided, automatically add a mmap area covering the entire region unless an mmap_areas array is provided. Signed-off-by: John Levon <john.levon@nutanix.com> Reviewed-by: Swapnil Ingle <swapnil.ingle@nutanix.com>
Diffstat (limited to 'include')
-rw-r--r--include/libvfio-user.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/include/libvfio-user.h b/include/libvfio-user.h
index 8e48a7d..0b5ac02 100644
--- a/include/libvfio-user.h
+++ b/include/libvfio-user.h
@@ -243,11 +243,11 @@ typedef ssize_t (vfu_region_access_cb_t)(vfu_ctx_t *vfu_ctx, char *buf,
* @region_idx: region index
* @size: size of the region
* @region_access: callback function to access region
- * @flags: region flags (VFU_REGION_FLAG_)
- * @mmap_areas: array of memory mappable areas; must be provided if the region
- * is mappable.
+ * @flags: region flags (VFU_REGION_FLAG_*)
+ * @mmap_areas: array of memory mappable areas; if an fd is provided, but this
+ * is NULL, then the entire region is mappable.
* @nr_mmap_areas: number of sparse areas in @mmap_areas; must be provided if
- * the region is mappable.
+ * the @mmap_areas is non-NULL, or 0 otherwise.
* @fd: file descriptor of the file backing the region if the region is
* mappable; it is the server's responsibility to create a file suitable for
* memory mapping by the client.