diff options
author | Yuval Shaia | 2019-08-18 15:21:06 +0200 |
---|---|---|
committer | Marcel Apfelbaum | 2019-11-06 11:48:41 +0100 |
commit | ee108585bb1924a8df88188925d0d01b90b4b9e8 (patch) | |
tree | 90b9fe6a983d53f96ca7dba5624ce067b43ddeaa | |
parent | Merge remote-tracking branch 'remotes/philmd-gitlab/tags/fw_cfg-next-pull-req... (diff) | |
download | qemu-ee108585bb1924a8df88188925d0d01b90b4b9e8.tar.gz qemu-ee108585bb1924a8df88188925d0d01b90b4b9e8.tar.xz qemu-ee108585bb1924a8df88188925d0d01b90b4b9e8.zip |
configure: Check if we can use ibv_reg_mr_iova
The function reg_mr_iova is an enhanced version of ibv_reg_mr function
that can help to easly register and use guest's MRs.
Add check in 'configure' phase to detect if we have libibverbs with this
support.
Signed-off-by: Yuval Shaia <yuval.shaia@oracle.com>
Reviewed-by: Marcel Apfelbaum <marcel.apfelbaum@gmail.com>
Message-Id: <20190818132107.18181-2-yuval.shaia@oracle.com>
Signed-off-by: Marcel Apfelbaum <marcel.apfelbaum@gmail.com>
-rwxr-xr-x | configure | 28 |
1 files changed, 28 insertions, 0 deletions
@@ -3217,6 +3217,34 @@ else pvrdma="no" fi +# Let's see if enhanced reg_mr is supported +if test "$pvrdma" = "yes" ; then + +cat > $TMPC <<EOF && +#include <infiniband/verbs.h> + +int +main(void) +{ + struct ibv_mr *mr; + struct ibv_pd *pd = NULL; + size_t length = 10; + uint64_t iova = 0; + int access = 0; + void *addr = NULL; + + mr = ibv_reg_mr_iova(pd, addr, length, iova, access); + + ibv_dereg_mr(mr); + + return 0; +} +EOF + if ! compile_prog "" "-libverbs"; then + QEMU_CFLAGS="$QEMU_CFLAGS -DLEGACY_RDMA_REG_MR" + fi +fi + ########################################## # VNC SASL detection if test "$vnc" = "yes" && test "$vnc_sasl" != "no" ; then |