aboutsummaryrefslogtreecommitdiff
path: root/lib/private.h
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 /lib/private.h
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 'lib/private.h')
-rw-r--r--lib/private.h8
1 files changed, 2 insertions, 6 deletions
diff --git a/lib/private.h b/lib/private.h
index 1674271..84caad5 100644
--- a/lib/private.h
+++ b/lib/private.h
@@ -68,11 +68,6 @@ typedef struct {
struct migration;
-struct vfu_sparse_mmap_areas {
- int nr_mmap_areas;
- struct iovec areas[];
-};
-
typedef struct {
/* Region flags, see VFU_REGION_FLAG_READ and friends. */
uint32_t flags;
@@ -81,7 +76,8 @@ typedef struct {
/* Callback that is called when the region is read or written. */
vfu_region_access_cb_t *cb;
/* Sparse mmap areas if set. */
- struct vfu_sparse_mmap_areas *mmap_areas;
+ struct iovec *mmap_areas;
+ int nr_mmap_areas;
/* fd for a mappable region, or -1. */
int fd;
} vfu_reg_info_t;