aboutsummaryrefslogtreecommitdiff
path: root/meson.build
diff options
context:
space:
mode:
authorThanos Makatos <thanos.makatos@nutanix.com>2022-07-04 12:16:08 +0100
committerGitHub <noreply@github.com>2022-07-04 12:16:08 +0100
commit36beb63be45ad1412562a98d9373a4c0bd91ab3d (patch)
tree61bb44f0befc0055292b120909251c0fc2d27b0e /meson.build
parent1c274027bb4f9d68eee846036e8d50dcde2fd7e9 (diff)
downloadlibvfio-user-36beb63be45ad1412562a98d9373a4c0bd91ab3d.zip
libvfio-user-36beb63be45ad1412562a98d9373a4c0bd91ab3d.tar.gz
libvfio-user-36beb63be45ad1412562a98d9373a4c0bd91ab3d.tar.bz2
support for shadow ioeventfd (#698)
When an ioeventfd is written to, KVM discards the value since it has no memory to write it to, and simply kicks the eventfd. This a problem for devices such a NVMe controllers that need the value (e.g. doorbells on BAR0). This patch allows the vfio-user server to pass a file descriptor that can be mmap'ed and KVM can write the ioeventfd value to this _shadow_ memory instead of discarding it. This shadow memory is not exposed to the guest. Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com> Reviewed-by: John Levon <john.levon@nutanix.com> Change-Id: Iad849c94076ffa5988e034c8bf7ec312d01f095f
Diffstat (limited to 'meson.build')
-rw-r--r--meson.build5
1 files changed, 5 insertions, 0 deletions
diff --git a/meson.build b/meson.build
index 03e9267..dba2ba6 100644
--- a/meson.build
+++ b/meson.build
@@ -18,6 +18,7 @@ opt_tran_pipe = get_option('tran-pipe')
opt_debug_logs = get_option('debug-logs')
opt_sanitizers = get_option('b_sanitize')
opt_debug = get_option('debug')
+opt_shadow_ioeventfd = get_option('shadow-ioeventfd')
cc = meson.get_compiler('c')
@@ -57,6 +58,10 @@ if opt_debug_logs.enabled() or (not opt_debug_logs.disabled() and opt_debug)
common_cflags += ['-DDEBUG']
endif
+if opt_shadow_ioeventfd
+ common_cflags += ['-DSHADOW_IOEVENTFD']
+endif
+
if get_option('warning_level') == '2'
# -Wall is set for 'warning_level>=1'
# -Wextra is set for 'warning_level>=2'