aboutsummaryrefslogtreecommitdiff
path: root/lib/private.h
diff options
context:
space:
mode:
authorThanos Makatos <thanos.makatos@nutanix.com>2020-12-14 15:50:37 +0000
committerGitHub <noreply@github.com>2020-12-14 15:50:37 +0000
commitf240c889171ab22e7b8b0b460792b0df94c335c1 (patch)
treec0a60b0dbd7f32ffac3b8caf8d1bbcfa8bfed491 /lib/private.h
parentd7157efb22c9fc06f85e40f0e6b6c5e16dc5e8e2 (diff)
downloadlibvfio-user-f240c889171ab22e7b8b0b460792b0df94c335c1.zip
libvfio-user-f240c889171ab22e7b8b0b460792b0df94c335c1.tar.gz
libvfio-user-f240c889171ab22e7b8b0b460792b0df94c335c1.tar.bz2
return region capabilities a la VFIO (#187)
This patch returns region capabilities the same way VFIO does: if argsz is not large enough then it returns only region info and sets argsz to what it should be in order to fit the capabilities, the client then retries with a large enough argsz. The protocol specification has been updated as well. Plus unit tests. Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com>
Diffstat (limited to 'lib/private.h')
-rw-r--r--lib/private.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/private.h b/lib/private.h
index 5321734..7860ec2 100644
--- a/lib/private.h
+++ b/lib/private.h
@@ -171,6 +171,9 @@ consume_fd(int *fds, size_t nr_fds, size_t index);
int
handle_device_get_info(vfu_ctx_t *vfu_ctx, uint32_t size,
struct vfio_device_info *dev_info);
+long
+dev_get_reginfo(vfu_ctx_t *vfu_ctx, uint32_t index, uint32_t argsz,
+ struct vfio_region_info **vfio_reg);
#endif /* LIB_VFIO_USER_PRIVATE_H */