config: split PVRDMA from RDMA
PATCH 1/1 config: split PVRDMA from RDMA
In some BSD systems RDMA migration is possible while the pvrdma device can't be compiled because the mremap system call is missing.
--- configure | 41 ++++++++++++++++++++++++++++++++++++++++- hw/rdma/Makefile.objs | 2 +- 2 files changed, 41 insertions(+), 2 deletions(-)
configure +40 -1
@@ -375,6 +375,7 @@ hax="no" hvf="no" whpx="no" rdma="" +pvrdma="" gprof="no" debug_tcg="no" debug="no"
@@ -1363,6 +1364,10 @@ for opt do ;; --disable-rdma) rdma="no" ;; + --enable-pvrdma) pvrdma="yes" + ;; + --disable-pvrdma) pvrdma="no" + ;; --with-gtkabi=*) gtkabi="$optarg" ;; --disable-vte) vte="no"
@@ -1669,7 +1674,8 @@ disabled with --disable-FEATURE, default is enabled if available: hax HAX acceleration support hvf Hypervisor.framework acceleration support whpx Windows Hypervisor Platform acceleration support - rdma Enable RDMA-based migration and PVRDMA support + rdma Enable RDMA-based migration + pvrdma Enable PVRDMA support vde support for vde network netmap support for netmap network linux-aio Linux AIO support
@@ -3064,6 +3070,34 @@ EOF fi fi +########################################## +# PVRDMA detection + +if test "$rdma" = "yes" ; then + case "$pvrdma" in + "") + if test "$bsd" = "yes"; then + pvrdma="no" + else + pvrdma="yes" + fi + ;; + "yes") + if test "$bsd" = "yes"; then + error_exit "PVRDMA is not supported for bsd" + fi + pvrdma="yes" + ;; + "no") + pvrdma="no" + ;; + esac +else + if test "$pvrdma" = "yes" ; then + error_exit "PVRDMA requires rdma suppport" + fi + pvrdma="no" +fi ########################################## # VNC SASL detection
@@ -5952,6 +5986,7 @@ if test "$tcg" = "yes" ; then fi echo "malloc trim support $malloc_trim" echo "RDMA support $rdma" +echo "PVRDMA support $pvrdma" echo "fdt support $fdt" echo "membarrier $membarrier" echo "preadv support $preadv"
@@ -6708,6 +6743,10 @@ if test "$rdma" = "yes" ; then echo "RDMA_LIBS=$rdma_libs" >> $config_host_mak fi +if test "$pvrdma" = "yes" ; then + echo "CONFIG_PVRDMA=y" >> $config_host_mak +fi + if test "$have_rtnetlink" = "yes" ; then echo "CONFIG_RTNETLINK=y" >> $config_host_mak fi
hw/rdma/Makefile.objs +1 -1
@@ -1,4 +1,4 @@ -ifeq ($(CONFIG_RDMA),y) +ifeq ($(CONFIG_PVRDMA),y) obj-$(CONFIG_PCI) += rdma_utils.o rdma_backend.o rdma_rm.o obj-$(CONFIG_PCI) += vmw/pvrdma_dev_ring.o vmw/pvrdma_cmd.o \ vmw/pvrdma_qp_ops.o vmw/pvrdma_main.o
Signature · 1 line
2.17.1
Quoted 10 lines · Marcel Apfelbaum
In some BSD systems RDMA migration is possible while the pvrdma device can't be compiled because the mremap system call is missing.
Reported-by Rebecca Cran <[email protected]>Signed-off-by Marcel Apfelbaum <[email protected]>--- configure | 41 ++++++++++++++++++++++++++++++++++++++++- hw/rdma/Makefile.objs | 2 +- 2 files changed, 41 insertions(+), 2 deletions(-)
[...]
hw/rdma/Makefile.objs line 4
Quoted 10 lines
hw/rdma/Makefile.objs +1
-1@@ -1,4 +1,4 @@ -ifeq ($(CONFIG_RDMA),y) +ifeq ($(CONFIG_PVRDMA),y) obj-$(CONFIG_PCI) += rdma_utils.o rdma_backend.o rdma_rm.o obj-$(CONFIG_PCI) += vmw/pvrdma_dev_ring.o vmw/pvrdma_cmd.o \ vmw/pvrdma_qp_ops.o vmw/pvrdma_main.o
Shouldn't just the second line be guarded by CONFIG_PVRDMA ?
Thomas
Quoted 8 lines · Marcel Apfelbaum
In some BSD systems RDMA migration is possible while the pvrdma device can't be compiled because the mremap system call is missing.
Reported-by Rebecca Cran <[email protected]>Signed-off-by Marcel Apfelbaum <[email protected]>configure +1
-0+##########################################
configure EOF · line 3083
Quoted 10 lines
configure +10
-0+# PVRDMA detection + +if test "$rdma" = "yes" ; then + case "$pvrdma" in + "") + if test "$bsd" = "yes"; then + pvrdma="no" + else + pvrdma="yes" + fi
Please don't do tests against "which host OS is this?" unless there is absolutely no other option. Prefer to test for presence/absence of specific features (eg "do we have mremap()?".
Otherwise you're likely to give the wrong answer for other host OSes we have support for (Haiku, Solaris) or other host OSes we add in future.
thanks
-- PMM