View | Details | Raw Unified | Return to bug 232968
Collapse All | Expand All

(-)Makefile (-1 / +1 lines)
Lines 3-9 Link Here
3
3
4
PORTNAME=	qemu
4
PORTNAME=	qemu
5
PORTVERSION=	2.12.0
5
PORTVERSION=	2.12.0
6
PORTREVISION=	1
6
PORTREVISION=	2
7
CATEGORIES=	emulators
7
CATEGORIES=	emulators
8
MASTER_SITES=	http://wiki.qemu.org/download/
8
MASTER_SITES=	http://wiki.qemu.org/download/
9
DIST_SUBDIR=	qemu/${PORTVERSION}
9
DIST_SUBDIR=	qemu/${PORTVERSION}
(-)files/patch-rdma-pvrdma-split (+123 lines)
Line 0 Link Here
1
diff --git configure configure
2
index 457684a7e6..3da60d8436 100755
3
--- configure
4
+++ configure
5
@@ -353,6 +353,7 @@ hax="no"
6
 hvf="no"
7
 whpx="no"
8
 rdma=""
9
+pvrdma=""
10
 gprof="no"
11
 debug_tcg="no"
12
 debug="no"
13
@@ -1308,6 +1309,10 @@ for opt do
14
   ;;
15
   --disable-rdma) rdma="no"
16
   ;;
17
+  --enable-pvrdma) pvrdma="yes"
18
+  ;;
19
+  --disable-pvrdma) pvrdma="no"
20
+  ;;
21
   --with-gtkabi=*) gtkabi="$optarg"
22
   ;;
23
   --disable-vte) vte="no"
24
@@ -1593,7 +1598,8 @@ disabled with --disable-FEATURE, default is enabled if available:
25
   hax             HAX acceleration support
26
   hvf             Hypervisor.framework acceleration support
27
   whpx            Windows Hypervisor Platform acceleration support
28
-  rdma            Enable RDMA-based migration and PVRDMA support
29
+  rdma            Enable RDMA-based migration
30
+  pvrdma          Enable PVRDMA support
31
   vde             support for vde network
32
   netmap          support for netmap network
33
   linux-aio       Linux AIO support
34
@@ -2971,6 +2977,48 @@ EOF
35
   fi
36
 fi
37
 
38
+##########################################
39
+# PVRDMA detection
40
+
41
+cat > $TMPC <<EOF &&
42
+#include <sys/mman.h>
43
+
44
+int
45
+main(void)
46
+{
47
+    char buf = 0;
48
+    void *addr = &buf;
49
+    addr = mremap(addr, 0, 1, MREMAP_MAYMOVE | MREMAP_FIXED);
50
+
51
+    return 0;
52
+}
53
+EOF
54
+
55
+if test "$rdma" = "yes" ; then
56
+    case "$pvrdma" in
57
+    "")
58
+        if compile_prog "" ""; then
59
+            pvrdma="yes"
60
+        else
61
+            pvrdma="no"
62
+        fi
63
+        ;;
64
+    "yes")
65
+        if ! compile_prog "" ""; then
66
+            error_exit "PVRDMA is not supported since mremap is not implemented"
67
+        fi
68
+        pvrdma="yes"
69
+        ;;
70
+    "no")
71
+        pvrdma="no"
72
+        ;;
73
+    esac
74
+else
75
+    if test "$pvrdma" = "yes" ; then
76
+        error_exit "PVRDMA requires rdma suppport"
77
+    fi
78
+    pvrdma="no"
79
+fi
80
 
81
 ##########################################
82
 # VNC SASL detection
83
@@ -5820,6 +5868,7 @@ if test "$tcg" = "yes" ; then
84
 fi
85
 echo "malloc trim support $malloc_trim"
86
 echo "RDMA support      $rdma"
87
+echo "PVRDMA support    $pvrdma"
88
 echo "fdt support       $fdt"
89
 echo "membarrier        $membarrier"
90
 echo "preadv support    $preadv"
91
@@ -6568,6 +6617,10 @@ if test "$rdma" = "yes" ; then
92
   echo "RDMA_LIBS=$rdma_libs" >> $config_host_mak
93
 fi
94
 
95
+if test "$pvrdma" = "yes" ; then
96
+  echo "CONFIG_PVRDMA=y" >> $config_host_mak
97
+fi
98
+
99
 if test "$have_rtnetlink" = "yes" ; then
100
   echo "CONFIG_RTNETLINK=y" >> $config_host_mak
101
 fi
102
diff --git hw/rdma/Makefile.objs hw/rdma/Makefile.objs
103
index 3504c39d21..bd36cbf51c 100644
104
--- hw/rdma/Makefile.objs
105
+++ hw/rdma/Makefile.objs
106
@@ -1,4 +1,4 @@
107
-ifeq ($(CONFIG_RDMA),y)
108
+ifeq ($(CONFIG_PVRDMA),y)
109
 obj-$(CONFIG_PCI) += rdma_utils.o rdma_backend.o rdma_rm.o
110
 obj-$(CONFIG_PCI) += vmw/pvrdma_dev_ring.o vmw/pvrdma_cmd.o \
111
                      vmw/pvrdma_qp_ops.o vmw/pvrdma_main.o
112
diff --git hw/rdma/vmw/pvrdma_cmd.c hw/rdma/vmw/pvrdma_cmd.c
113
index 99019d8741..bd14b4bc47 100644
114
--- hw/rdma/vmw/pvrdma_cmd.c
115
+++ hw/rdma/vmw/pvrdma_cmd.c
116
@@ -16,7 +16,6 @@
117
 #include "qemu/osdep.h"
118
 #include "qemu/error-report.h"
119
 #include "cpu.h"
120
-#include <linux/types.h>
121
 #include "hw/hw.h"
122
 #include "hw/pci/pci.h"
123
 #include "hw/pci/pci_ids.h"

Return to bug 232968