diff mbox

[RFC,RDMA,support,v6:,1/7] ./configure and Makefile

Message ID 1365568180-19593-2-git-send-email-mrhines@linux.vnet.ibm.com
State New
Headers show

Commit Message

mrhines@linux.vnet.ibm.com April 10, 2013, 4:29 a.m. UTC
From: "Michael R. Hines" <mrhines@us.ibm.com>

RDMA is enabled by default per the usual ./configure testing.

Only one new file is added in the patch now (migration-rdma.c),
which is conditionalized by CONFIG_RDMA.

Signed-off-by: Michael R. Hines <mrhines@us.ibm.com>
---
 Makefile.objs |    1 +
 configure     |   29 +++++++++++++++++++++++++++++
 2 files changed, 30 insertions(+)

Comments

Paolo Bonzini April 10, 2013, 7:52 a.m. UTC | #1
Il 10/04/2013 06:29, mrhines@linux.vnet.ibm.com ha scritto:
> diff --git a/Makefile.objs b/Makefile.objs
> index e568c01..10431bd 100644
> --- a/Makefile.objs
> +++ b/Makefile.objs
> @@ -49,6 +49,7 @@ common-obj-$(CONFIG_POSIX) += os-posix.o
>  common-obj-$(CONFIG_LINUX) += fsdev/
>  
>  common-obj-y += migration.o migration-tcp.o
> +common-obj-$(CONFIG_RDMA) += migration-rdma.o
>  common-obj-y += qemu-char.o #aio.o
>  common-obj-y += block-migration.o
>  common-obj-y += page_cache.o xbzrle.o

This is in patch 5.

Paolo
mrhines@linux.vnet.ibm.com April 10, 2013, 12:37 p.m. UTC | #2
On 04/10/2013 03:52 AM, Paolo Bonzini wrote:
> Il 10/04/2013 06:29, mrhines@linux.vnet.ibm.com ha scritto:
>> diff --git a/Makefile.objs b/Makefile.objs
>> index e568c01..10431bd 100644
>> --- a/Makefile.objs
>> +++ b/Makefile.objs
>> @@ -49,6 +49,7 @@ common-obj-$(CONFIG_POSIX) += os-posix.o
>>   common-obj-$(CONFIG_LINUX) += fsdev/
>>   
>>   common-obj-y += migration.o migration-tcp.o
>> +common-obj-$(CONFIG_RDMA) += migration-rdma.o
>>   common-obj-y += qemu-char.o #aio.o
>>   common-obj-y += block-migration.o
>>   common-obj-y += page_cache.o xbzrle.o
> This is in patch 5.
>
> Paolo
>

I don't understand this comment. Can you clarify?

- Michael
Paolo Bonzini April 10, 2013, 12:42 p.m. UTC | #3
Il 10/04/2013 14:37, Michael R. Hines ha scritto:
>>>
>>> +common-obj-$(CONFIG_RDMA) += migration-rdma.o
>>>   common-obj-y += qemu-char.o #aio.o
>>>   common-obj-y += block-migration.o
>>>   common-obj-y += page_cache.o xbzrle.o
>> This is in patch 5.
>>
>> Paolo
>>
> 
> I don't understand this comment. Can you clarify?

You should not add the file to the Makefile until the file exists.

Paolo
mrhines@linux.vnet.ibm.com April 10, 2013, 1:11 p.m. UTC | #4
On 04/10/2013 08:42 AM, Paolo Bonzini wrote:
> Il 10/04/2013 14:37, Michael R. Hines ha scritto:
>>>> +common-obj-$(CONFIG_RDMA) += migration-rdma.o
>>>>    common-obj-y += qemu-char.o #aio.o
>>>>    common-obj-y += block-migration.o
>>>>    common-obj-y += page_cache.o xbzrle.o
>>> This is in patch 5.
>>>
>>> Paolo
>>>
>> I don't understand this comment. Can you clarify?
> You should not add the file to the Makefile until the file exists.
>
> Paolo
>

Ah! Ok. Understood =)
diff mbox

Patch

diff --git a/Makefile.objs b/Makefile.objs
index e568c01..10431bd 100644
--- a/Makefile.objs
+++ b/Makefile.objs
@@ -49,6 +49,7 @@  common-obj-$(CONFIG_POSIX) += os-posix.o
 common-obj-$(CONFIG_LINUX) += fsdev/
 
 common-obj-y += migration.o migration-tcp.o
+common-obj-$(CONFIG_RDMA) += migration-rdma.o
 common-obj-y += qemu-char.o #aio.o
 common-obj-y += block-migration.o
 common-obj-y += page_cache.o xbzrle.o
diff --git a/configure b/configure
index 1ed939a..8ade7ce 100755
--- a/configure
+++ b/configure
@@ -180,6 +180,7 @@  xfs=""
 
 vhost_net="no"
 kvm="no"
+rdma="yes"
 gprof="no"
 debug_tcg="no"
 debug="no"
@@ -918,6 +919,10 @@  for opt do
   ;;
   --enable-gtk) gtk="yes"
   ;;
+  --enable-rdma) rdma="yes"
+  ;;
+  --disable-rdma) rdma="no"
+  ;;
   --with-gtkabi=*) gtkabi="$optarg"
   ;;
   --enable-tpm) tpm="yes"
@@ -1122,6 +1127,8 @@  echo "  --enable-bluez           enable bluez stack connectivity"
 echo "  --disable-slirp          disable SLIRP userspace network connectivity"
 echo "  --disable-kvm            disable KVM acceleration support"
 echo "  --enable-kvm             enable KVM acceleration support"
+echo "  --disable-rdma           disable RDMA-based migration support"
+echo "  --enable-rdma            enable RDMA-based migration support"
 echo "  --enable-tcg-interpreter enable TCG with bytecode interpreter (TCI)"
 echo "  --disable-nptl           disable usermode NPTL support"
 echo "  --enable-nptl            enable usermode NPTL support"
@@ -1767,6 +1774,23 @@  EOF
   libs_softmmu="$sdl_libs $libs_softmmu"
 fi
 
+if test "$rdma" != "no" ; then
+  cat > $TMPC <<EOF
+#include <rdma/rdma_cma.h>
+int main(void) { return 0; }
+EOF
+  rdma_libs="-lrdmacm -libverbs"
+  if compile_prog "-Werror" "$rdma_libs" ; then
+    rdma="yes"
+    libs_softmmu="$libs_softmmu $rdma_libs"
+  else
+    if test "$rdma" = "yes" ; then
+      feature_not_found "rdma"
+    fi
+    rdma="no"
+  fi
+fi
+
 ##########################################
 # VNC TLS/WS detection
 if test "$vnc" = "yes" -a \( "$vnc_tls" != "no" -o "$vnc_ws" != "no" \) ; then
@@ -3408,6 +3432,7 @@  echo "Linux AIO support $linux_aio"
 echo "ATTR/XATTR support $attr"
 echo "Install blobs     $blobs"
 echo "KVM support       $kvm"
+echo "RDMA support      $rdma"
 echo "TCG interpreter   $tcg_interpreter"
 echo "fdt support       $fdt"
 echo "preadv support    $preadv"
@@ -4377,6 +4402,10 @@  if [ "$pixman" = "internal" ]; then
   echo "config-host.h: subdir-pixman" >> $config_host_mak
 fi
 
+if test "$rdma" = "yes" ; then
+echo "CONFIG_RDMA=y" >> $config_host_mak
+fi
+
 # build tree in object directory in case the source is not in the current directory
 DIRS="tests tests/tcg tests/tcg/cris tests/tcg/lm32"
 DIRS="$DIRS pc-bios/optionrom pc-bios/spapr-rtas"