diff options
author | JAKelly10 <87753759+JAKelly10@users.noreply.github.com> | 2021-09-08 15:47:23 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-09-08 15:47:23 +0100 |
commit | d12584bf8c726a1907655f03e5a18b549599da41 (patch) | |
tree | 1f302bbedbe23805551127f74f1d3f8186a92fa2 /lib/private.h | |
parent | 080e664ed5e79dcf5ae5a36521cab0ddb7ebc5f0 (diff) | |
download | libvfio-user-d12584bf8c726a1907655f03e5a18b549599da41.zip libvfio-user-d12584bf8c726a1907655f03e5a18b549599da41.tar.gz libvfio-user-d12584bf8c726a1907655f03e5a18b549599da41.tar.bz2 |
initial ioeventfd support (#601)
Provide initial support for handling VFIO_USER_DEVICE_GET_REGION_IO_FDS, along with a new vfu_create_ioeventfd() API.
Reviewed-by: John Levon <john.levon@nutanix.com>
Diffstat (limited to 'lib/private.h')
-rw-r--r-- | lib/private.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/private.h b/lib/private.h index fb26b6a..93a354b 100644 --- a/lib/private.h +++ b/lib/private.h @@ -34,6 +34,7 @@ #define LIB_VFIO_USER_PRIVATE_H #include <errno.h> +#include <sys/queue.h> #include "common.h" #include "pci_caps.h" @@ -133,6 +134,8 @@ typedef struct { int fd; /* offset of region within fd. */ uint64_t offset; + /* The subregions for ioregionfds and ioeventfds */ + LIST_HEAD(, ioeventfd) subregions; } vfu_reg_info_t; struct pci_dev { @@ -173,6 +176,15 @@ struct vfu_ctx { vfu_dev_type_t dev_type; }; +typedef struct ioeventfd { + uint64_t offset; + uint64_t size; + int32_t fd; + uint32_t flags; + uint64_t datamatch; + LIST_ENTRY(ioeventfd) entry; +} ioeventfd_t; + static inline int ERROR_INT(int err) { |