summaryrefslogtreecommitdiffstats
path: root/meson.build
diff options
context:
space:
mode:
authorReinoud Zandijk2021-04-02 22:25:32 +0200
committerPaolo Bonzini2021-05-04 14:15:34 +0200
commit74a414a1dfdd7a9aa2d716f991c8a5c0853250ad (patch)
tree5ca768acb594f47424cbdd26f75223fbd4c6a9b6 /meson.build
parentoslib-win32: do not rely on macro to get redefined function name (diff)
downloadqemu-74a414a1dfdd7a9aa2d716f991c8a5c0853250ad.tar.gz
qemu-74a414a1dfdd7a9aa2d716f991c8a5c0853250ad.tar.xz
qemu-74a414a1dfdd7a9aa2d716f991c8a5c0853250ad.zip
Add NVMM accelerator: configure and build logic
Signed-off-by: Kamil Rytarowski <kamil@NetBSD.org> Signed-off-by: Reinoud Zandijk <reinoud@NetBSD.org> Message-Id: <20210402202535.11550-2-reinoud@NetBSD.org> [Check for nvmm_vcpu_stop. - Paolo] Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'meson.build')
-rw-r--r--meson.build14
1 files changed, 14 insertions, 0 deletions
diff --git a/meson.build b/meson.build
index 1ffdc9e6c4..2829ed2b86 100644
--- a/meson.build
+++ b/meson.build
@@ -87,6 +87,7 @@ if cpu in ['x86', 'x86_64']
accelerator_targets += {
'CONFIG_HAX': ['i386-softmmu', 'x86_64-softmmu'],
'CONFIG_HVF': ['x86_64-softmmu'],
+ 'CONFIG_NVMM': ['i386-softmmu', 'x86_64-softmmu'],
'CONFIG_WHPX': ['i386-softmmu', 'x86_64-softmmu'],
}
endif
@@ -170,6 +171,7 @@ version_res = []
coref = []
iokit = []
emulator_link_args = []
+nvmm =not_found
hvf = not_found
if targetos == 'windows'
socket = cc.find_library('ws2_32')
@@ -227,6 +229,14 @@ if not get_option('hax').disabled()
accelerators += 'CONFIG_HAX'
endif
endif
+if targetos == 'netbsd'
+ if cc.has_header_symbol('nvmm.h', 'nvmm_cpu_stop', required: get_option('nvmm'))
+ nvmm = cc.find_library('nvmm', required: get_option('nvmm'))
+ endif
+ if nvmm.found()
+ accelerators += 'CONFIG_NVMM'
+ endif
+endif
tcg_arch = config_host['ARCH']
if not get_option('tcg').disabled()
@@ -270,6 +280,9 @@ endif
if 'CONFIG_HVF' not in accelerators and get_option('hvf').enabled()
error('HVF not available on this platform')
endif
+if 'CONFIG_NVMM' not in accelerators and get_option('nvmm').enabled()
+ error('NVMM not available on this platform')
+endif
if 'CONFIG_WHPX' not in accelerators and get_option('whpx').enabled()
error('WHPX not available on this platform')
endif
@@ -2581,6 +2594,7 @@ if have_system
summary_info += {'HAX support': config_all.has_key('CONFIG_HAX')}
summary_info += {'HVF support': config_all.has_key('CONFIG_HVF')}
summary_info += {'WHPX support': config_all.has_key('CONFIG_WHPX')}
+ summary_info += {'NVMM support': config_all.has_key('CONFIG_NVMM')}
summary_info += {'Xen support': config_host.has_key('CONFIG_XEN_BACKEND')}
if config_host.has_key('CONFIG_XEN_BACKEND')
summary_info += {'xen ctrl version': config_host['CONFIG_XEN_CTRL_INTERFACE_VERSION']}