mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-08 02:03:56 -06:00
vfio-user: build library
add the libvfio-user library as a submodule. build it as a meson subproject. libvfio-user is distributed with BSD 3-Clause license and json-c with MIT (Expat) license Signed-off-by: Elena Ufimtseva <elena.ufimtseva@oracle.com> Signed-off-by: John G Johnson <john.g.johnson@oracle.com> Signed-off-by: Jagannathan Raman <jag.raman@oracle.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Message-id: c2adec87958b081d1dc8775d4aa05c897912f025.1655151679.git.jag.raman@oracle.com [Changed submodule URL to QEMU's libvfio-user mirror on GitLab. The QEMU project mirrors its dependencies so that it can provide full source code even in the event that its dependencies become unavailable. Note that the mirror repo is manually updated, so please contact me to make newer libvfio-user commits available. If I become a bottleneck we can set up a cronjob. Updated scripts/meson-buildoptions.sh to match the meson_options.txt change. Failure to do so can result in scripts/meson-buildoptions.sh being modified by the build system later on and you end up with a dirty working tree. --Stefan] Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
This commit is contained in:
parent
9b5b473eae
commit
55116968de
12 changed files with 63 additions and 1 deletions
23
meson.build
23
meson.build
|
@ -308,6 +308,10 @@ multiprocess_allowed = get_option('multiprocess') \
|
|||
.require(targetos == 'linux', error_message: 'Multiprocess QEMU is supported only on Linux') \
|
||||
.allowed()
|
||||
|
||||
vfio_user_server_allowed = get_option('vfio_user_server') \
|
||||
.require(targetos == 'linux', error_message: 'vfio-user server is supported only on Linux') \
|
||||
.allowed()
|
||||
|
||||
have_tpm = get_option('tpm') \
|
||||
.require(targetos != 'windows', error_message: 'TPM emulation only available on POSIX systems') \
|
||||
.allowed()
|
||||
|
@ -2380,7 +2384,8 @@ host_kconfig = \
|
|||
(have_virtfs ? ['CONFIG_VIRTFS=y'] : []) + \
|
||||
('CONFIG_LINUX' in config_host ? ['CONFIG_LINUX=y'] : []) + \
|
||||
(have_pvrdma ? ['CONFIG_PVRDMA=y'] : []) + \
|
||||
(multiprocess_allowed ? ['CONFIG_MULTIPROCESS_ALLOWED=y'] : [])
|
||||
(multiprocess_allowed ? ['CONFIG_MULTIPROCESS_ALLOWED=y'] : []) + \
|
||||
(vfio_user_server_allowed ? ['CONFIG_VFIO_USER_SERVER_ALLOWED=y'] : [])
|
||||
|
||||
ignored = [ 'TARGET_XML_FILES', 'TARGET_ABI_DIR', 'TARGET_ARCH' ]
|
||||
|
||||
|
@ -2672,6 +2677,21 @@ if have_system
|
|||
endif
|
||||
endif
|
||||
|
||||
libvfio_user_dep = not_found
|
||||
if have_system and vfio_user_server_allowed
|
||||
have_internal = fs.exists(meson.current_source_dir() / 'subprojects/libvfio-user/meson.build')
|
||||
|
||||
if not have_internal
|
||||
error('libvfio-user source not found - please pull git submodule')
|
||||
endif
|
||||
|
||||
libvfio_user_proj = subproject('libvfio-user')
|
||||
|
||||
libvfio_user_lib = libvfio_user_proj.get_variable('libvfio_user_dep')
|
||||
|
||||
libvfio_user_dep = declare_dependency(dependencies: [libvfio_user_lib])
|
||||
endif
|
||||
|
||||
fdt = not_found
|
||||
if have_system
|
||||
fdt_opt = get_option('fdt')
|
||||
|
@ -3790,6 +3810,7 @@ summary_info += {'target list': ' '.join(target_dirs)}
|
|||
if have_system
|
||||
summary_info += {'default devices': get_option('default_devices')}
|
||||
summary_info += {'out of process emulation': multiprocess_allowed}
|
||||
summary_info += {'vfio-user server': vfio_user_server_allowed}
|
||||
endif
|
||||
summary(summary_info, bool_yn: true, section: 'Targets and accelerators')
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue