aboutsummaryrefslogtreecommitdiff
path: root/meson.build
diff options
context:
space:
mode:
authorXie Yongji <xieyongji@bytedance.com>2022-05-23 16:46:09 +0800
committerKevin Wolf <kwolf@redhat.com>2022-06-24 17:07:06 +0200
commit2a2359b84407b35fe978e98b7396f2ab8c5dd8b7 (patch)
tree9ed8b268bc8db0f025db90f5307a822d5fdfb13a /meson.build
parenta6caeee8111386b2d16ee07fe817193cde7f0d2a (diff)
vduse-blk: Implement vduse-blk export
This implements a VDUSE block backends based on the libvduse library. We can use it to export the BDSs for both VM and container (host) usage. The new command-line syntax is: $ qemu-storage-daemon \ --blockdev file,node-name=drive0,filename=test.img \ --export vduse-blk,node-name=drive0,id=vduse-export0,writable=on After the qemu-storage-daemon started, we need to use the "vdpa" command to attach the device to vDPA bus: $ vdpa dev add name vduse-export0 mgmtdev vduse Also the device must be removed via the "vdpa" command before we stop the qemu-storage-daemon. Signed-off-by: Xie Yongji <xieyongji@bytedance.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Message-Id: <20220523084611.91-7-xieyongji@bytedance.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'meson.build')
-rw-r--r--meson.build13
1 files changed, 13 insertions, 0 deletions
diff --git a/meson.build b/meson.build
index ecfe31ca87..397ca1d60a 100644
--- a/meson.build
+++ b/meson.build
@@ -1550,6 +1550,17 @@ elif get_option('libvduse').disabled()
have_libvduse = false
endif
+have_vduse_blk_export = (have_libvduse and targetos == 'linux')
+if get_option('vduse_blk_export').enabled()
+ if targetos != 'linux'
+ error('vduse_blk_export requires linux')
+ elif not have_libvduse
+ error('vduse_blk_export requires libvduse support')
+ endif
+elif get_option('vduse_blk_export').disabled()
+ have_vduse_blk_export = false
+endif
+
# libbpf
libbpf = dependency('libbpf', required: get_option('bpf'), method: 'pkg-config')
if libbpf.found() and not cc.links('''
@@ -1792,6 +1803,7 @@ config_host_data.set('CONFIG_VHOST_CRYPTO', have_vhost_user_crypto)
config_host_data.set('CONFIG_VHOST_VDPA', have_vhost_vdpa)
config_host_data.set('CONFIG_VMNET', vmnet.found())
config_host_data.set('CONFIG_VHOST_USER_BLK_SERVER', have_vhost_user_blk_server)
+config_host_data.set('CONFIG_VDUSE_BLK_EXPORT', have_vduse_blk_export)
config_host_data.set('CONFIG_PNG', png.found())
config_host_data.set('CONFIG_VNC', vnc.found())
config_host_data.set('CONFIG_VNC_JPEG', jpeg.found())
@@ -3857,6 +3869,7 @@ if have_block
summary_info += {'qed support': get_option('qed').allowed()}
summary_info += {'parallels support': get_option('parallels').allowed()}
summary_info += {'FUSE exports': fuse}
+ summary_info += {'VDUSE block exports': have_vduse_blk_export}
endif
summary(summary_info, bool_yn: true, section: 'Block layer support')