summaryrefslogtreecommitdiffstats
path: root/src/vlib
diff options
context:
space:
mode:
authorTom Jones <thj@freebsd.org>2024-01-30 13:54:12 +0000
committerDamjan Marion <dmarion@0xa5.net>2024-02-18 16:02:27 +0000
commitaaa2a89a3d927683af46793b6ad666e8ff591de9 (patch)
treece8a56a64eff3a6aeaa2ed9be9025049d221e427 /src/vlib
parent646e5d2ad4b6db1cd15d9b2cd84d3a76ca87749d (diff)
vlib: Only init vfio on Linux
Type: improvement Change-Id: Id1c72928324b85bc67860e600722bf8baeff45b2 Signed-off-by: Tom Jones <thj@freebsd.org>
Diffstat (limited to 'src/vlib')
-rw-r--r--src/vlib/physmem.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/vlib/physmem.c b/src/vlib/physmem.c
index 0abfe7ece56..15e912fd9e7 100644
--- a/src/vlib/physmem.c
+++ b/src/vlib/physmem.c
@@ -104,8 +104,10 @@ vlib_physmem_init (vlib_main_t * vm)
vpm->flags |= VLIB_PHYSMEM_MAIN_F_HAVE_PAGEMAP;
vec_free (pt);
+#ifdef __linux__
if ((error = linux_vfio_init (vm)))
return error;
+#endif /* __linux__ */
p = clib_mem_alloc_aligned (sizeof (clib_pmalloc_main_t),
CLIB_CACHE_LINE_BYTES);