diff options
author | Thanos Makatos <thanos.makatos@nutanix.com> | 2019-08-27 08:58:17 -0400 |
---|---|---|
committer | Felipe Franciosi <felipe@nutanix.com> | 2019-09-05 16:45:35 +0100 |
commit | 2b0970088feaf2239ad47f74c050aad370989e06 (patch) | |
tree | 0b209346b16d102172b6adf9dd236ea7e15e49a9 /kmod | |
parent | 1693baa1870d141434f1e0d0606d8b08c6fe22c5 (diff) | |
download | libvfio-user-2b0970088feaf2239ad47f74c050aad370989e06.zip libvfio-user-2b0970088feaf2239ad47f74c050aad370989e06.tar.gz libvfio-user-2b0970088feaf2239ad47f74c050aad370989e06.tar.bz2 |
move device mmap to per-region callbacks
Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com>
Diffstat (limited to 'kmod')
-rw-r--r-- | kmod/muser.c | 3 | ||||
-rw-r--r-- | kmod/muser.h | 9 |
2 files changed, 8 insertions, 4 deletions
diff --git a/kmod/muser.c b/kmod/muser.c index 8a4ceb0..ccb3f2a 100644 --- a/kmod/muser.c +++ b/kmod/muser.c @@ -1252,8 +1252,7 @@ static int muser_mmap(struct mdev_device *const mdev, mucmd.type = MUSER_MMAP; mucmd.muser_cmd.type = MUSER_MMAP; - mucmd.muser_cmd.mmap.request.start = vma->vm_start; - mucmd.muser_cmd.mmap.request.end = vma->vm_end; + mucmd.muser_cmd.mmap.request.len = vma->vm_end - vma->vm_start; mucmd.muser_cmd.mmap.request.pgoff = vma->vm_pgoff; mucmd.mmap_len = vma->vm_end - vma->vm_start; diff --git a/kmod/muser.h b/kmod/muser.h index 14fecd6..0cd76a9 100644 --- a/kmod/muser.h +++ b/kmod/muser.h @@ -47,8 +47,13 @@ struct muser_cmd_ioctl { union muser_cmd_mmap { struct { - unsigned long start; - unsigned long end; + union { + struct { + unsigned long start; + unsigned long end; + }; + unsigned long len; + }; unsigned long flags; unsigned long pgoff; } request; |