[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH PULL 15/15] config: split PVRDMA from RDMA
From: |
Marcel Apfelbaum |
Subject: |
[Qemu-devel] [PATCH PULL 15/15] config: split PVRDMA from RDMA |
Date: |
Sun, 19 Aug 2018 23:23:00 +0300 |
In some BSD systems RDMA migration is possible while
the pvrdma device can't be used because the mremap system call
is missing.
Reported-by: Rebecca Cran <address@hidden>
Signed-off-by: Marcel Apfelbaum <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: Thomas Huth <address@hidden>
---
configure | 55 ++++++++++++++++++++++++++++++++++++++++++-
hw/rdma/Makefile.objs | 2 +-
2 files changed, 55 insertions(+), 2 deletions(-)
diff --git a/configure b/configure
index db97930314..7d9a63636c 100755
--- a/configure
+++ b/configure
@@ -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,48 @@ EOF
fi
fi
+##########################################
+# PVRDMA detection
+
+cat > $TMPC <<EOF &&
+#include <sys/mman.h>
+
+int
+main(void)
+{
+ char buf = 0;
+ void *addr = &buf;
+ addr = mremap(addr, 0, 1, MREMAP_MAYMOVE | MREMAP_FIXED);
+
+ return 0;
+}
+EOF
+
+if test "$rdma" = "yes" ; then
+ case "$pvrdma" in
+ "")
+ if compile_prog "" ""; then
+ pvrdma="yes"
+ else
+ pvrdma="no"
+ fi
+ ;;
+ "yes")
+ if ! compile_prog "" ""; then
+ error_exit "PVRDMA is not supported since mremap is not
implemented"
+ 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 +6000,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 +6757,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
diff --git a/hw/rdma/Makefile.objs b/hw/rdma/Makefile.objs
index 3504c39d21..bd36cbf51c 100644
--- a/hw/rdma/Makefile.objs
+++ b/hw/rdma/Makefile.objs
@@ -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
--
2.17.1
- [Qemu-devel] [PATCH PULL 05/15] hw/pvrdma: Make default pkey 0xFFFF, (continued)
- [Qemu-devel] [PATCH PULL 05/15] hw/pvrdma: Make default pkey 0xFFFF, Marcel Apfelbaum, 2018/08/20
- [Qemu-devel] [PATCH PULL 06/15] hw/rdma: Delete useless structure RdmaRmUserMR, Marcel Apfelbaum, 2018/08/20
- [Qemu-devel] [PATCH PULL 08/15] hw/rdma: Reorder resource cleanup, Marcel Apfelbaum, 2018/08/20
- [Qemu-devel] [PATCH PULL 09/15] hw/pvrdma: Cosmetic change - indent right, Marcel Apfelbaum, 2018/08/20
- [Qemu-devel] [PATCH PULL 07/15] hw/rdma: Do not allocate memory for non-dma MR, Marcel Apfelbaum, 2018/08/20
- [Qemu-devel] [PATCH PULL 14/15] hw/pvrdma: remove not needed include, Marcel Apfelbaum, 2018/08/20
- [Qemu-devel] [PATCH PULL 12/15] hw/rdma: Bugfix - Support non-aligned buffers, Marcel Apfelbaum, 2018/08/20
- [Qemu-devel] [PATCH PULL 13/15] hw/rdma: Add reference to pci_dev in backend_dev, Marcel Apfelbaum, 2018/08/20
- [Qemu-devel] [PATCH PULL 10/15] hw/rdma: Cosmetic change - move to generic function, Marcel Apfelbaum, 2018/08/20
- [Qemu-devel] [PATCH PULL 11/15] hw/rdma: Print backend QP number in hex format, Marcel Apfelbaum, 2018/08/20
- [Qemu-devel] [PATCH PULL 15/15] config: split PVRDMA from RDMA,
Marcel Apfelbaum <=
- Re: [Qemu-devel] [PATCH PULL 00/15] RDMA queue, Peter Maydell, 2018/08/20