aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorJag Raman <jraman567@gmail.com>2021-07-13 12:18:33 -0400
committerGitHub <noreply@github.com>2021-07-13 17:18:33 +0100
commite0c15dfd087f8093ee6aab697e9ac2a252ab42bb (patch)
treef853f527ae541c03b16055cc1efc5c53e3382ec2 /include
parentf44091db918d54211cb43683b091c61a6177d450 (diff)
downloadlibvfio-user-e0c15dfd087f8093ee6aab697e9ac2a252ab42bb.zip
libvfio-user-e0c15dfd087f8093ee6aab697e9ac2a252ab42bb.tar.gz
libvfio-user-e0c15dfd087f8093ee6aab697e9ac2a252ab42bb.tar.bz2
add VFU_REGION_FLAG_ALWAYS_CB to receive callback always (#583)
Diffstat (limited to 'include')
-rw-r--r--include/libvfio-user.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/libvfio-user.h b/include/libvfio-user.h
index 75de04e..4b08c22 100644
--- a/include/libvfio-user.h
+++ b/include/libvfio-user.h
@@ -221,6 +221,7 @@ typedef ssize_t (vfu_region_access_cb_t)(vfu_ctx_t *vfu_ctx, char *buf,
#define VFU_REGION_FLAG_WRITE (1 << 1)
#define VFU_REGION_FLAG_RW (VFU_REGION_FLAG_READ | VFU_REGION_FLAG_WRITE)
#define VFU_REGION_FLAG_MEM (1 << 2) // if unset, bar is IO
+#define VFU_REGION_FLAG_ALWAYS_CB (1 << 3)
/**
* Set up a device region.
@@ -262,6 +263,8 @@ typedef ssize_t (vfu_region_access_cb_t)(vfu_ctx_t *vfu_ctx, char *buf,
* - if no callback is provided, reads to other areas are a simple memcpy(),
* and writes are an error
* - otherwise, the callback is expected to handle the access
+ * - if VFU_REGION_FLAG_ALWAYS_CB flag is set, all accesses to the config
+ * space are forwarded to the callback
*
* Regions VFU_PCI_DEV_MIGR_REGION_IDX and VFU_GENERIC_DEV_MIGR_REG_IDX,
* corresponding to the migration region, enable live migration support for