From nobody Tue Nov 11 22:40:33 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=oracle.com ARC-Seal: i=1; a=rsa-sha256; t=1566134659; cv=none; d=zoho.com; s=zohoarc; b=eeoPksyRkuPDH95jkMHWgBvRSiuAjDiRV//tFS7C930pDPR9ST7O8F4sPmVqw2cQq7FlQCLIWh/X3YBGRloP/cc0L9rfBr5TFv1MS63riEdpPfNN6lsJ14w08fDsu3dsnvKXJbqcqcXibYfksnXOVQffBibFm2b94syLJj+/cFQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1566134659; h=Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=agKDKB9XoDJ/onXjH/R69wBWoq9VofDS9IhKS2V7ph8=; b=iJMglyaP5l18YaZg2VhX/jSBrKTTf8ry9rbGJbjNYrElSTM4BA2ekfIdBCSqD/6kiMnSwZosM/tb80rRHZ07qm46kf4Y4qaHc6QYPbzF9ni8ixJ2hEEK/9ATlsDrpt7pgsPbOTlah3Yw9YbHzzR0URCypNrhGfg7Tnv6ttKtT5c= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 156613465992915.666074852526322; Sun, 18 Aug 2019 06:24:19 -0700 (PDT) Received: from localhost ([::1]:41208 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1hzLAQ-0000AH-U9 for importer@patchew.org; Sun, 18 Aug 2019 09:24:18 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:49202) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1hzL7c-0006L5-0e for qemu-devel@nongnu.org; Sun, 18 Aug 2019 09:21:26 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hzL7a-00009u-Kp for qemu-devel@nongnu.org; Sun, 18 Aug 2019 09:21:23 -0400 Received: from userp2130.oracle.com ([156.151.31.86]:36364) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hzL7a-00008x-DN for qemu-devel@nongnu.org; Sun, 18 Aug 2019 09:21:22 -0400 Received: from pps.filterd (userp2130.oracle.com [127.0.0.1]) by userp2130.oracle.com (8.16.0.27/8.16.0.27) with SMTP id x7IDKZbF028261; Sun, 18 Aug 2019 13:21:19 GMT Received: from userp3020.oracle.com (userp3020.oracle.com [156.151.31.79]) by userp2130.oracle.com with ESMTP id 2ue90t3mn4-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sun, 18 Aug 2019 13:21:19 +0000 Received: from pps.filterd (userp3020.oracle.com [127.0.0.1]) by userp3020.oracle.com (8.16.0.27/8.16.0.27) with SMTP id x7IDIAdD087326; Sun, 18 Aug 2019 13:21:19 GMT Received: from userv0121.oracle.com (userv0121.oracle.com [156.151.31.72]) by userp3020.oracle.com with ESMTP id 2ue8wx80n5-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sun, 18 Aug 2019 13:21:19 +0000 Received: from abhmp0012.oracle.com (abhmp0012.oracle.com [141.146.116.18]) by userv0121.oracle.com (8.14.4/8.13.8) with ESMTP id x7IDLFpZ020074; Sun, 18 Aug 2019 13:21:16 GMT Received: from host4.lan (/77.138.183.59) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Sun, 18 Aug 2019 06:21:15 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding; s=corp-2019-08-05; bh=agKDKB9XoDJ/onXjH/R69wBWoq9VofDS9IhKS2V7ph8=; b=F87nq17zc/lpcu0eVcFP6kzZoZm2B7uKRmMQtmW4prQRR4ug0lD81DZj3FMlC5Jw+mtf yq1TUJDEkqhiMcCqH7CGE9ttEHwSyGYBVZOo0bB8ropPyBexWCt56u16EVQ9K7qGWlOd gfZF1cEN2Hfq2in1X4/XWjjk4oQHAM9eXygYy8s6wp1Km3RSXTF807f3cPIAimwX2pnk sgl9Se9iR6PzfNjbXsAdtILrX7rVb2+9BNdpmj9UV8r/AfmVrRy8srdRbqPBWNtVpYZJ wUJ9VyThcyLRRtgCZpB43b2fV39cILaI5plBGOv7LOI3dikvyJtQM0tN+M3R+j/0d8Fh /Q== From: Yuval Shaia To: berrange@redhat.com, thuth@redhat.com, philmd@redhat.com, pbonzini@redhat.com, laurent@vivier.eu, qemu-devel@nongnu.org, yuval.shaia@oracle.com, marcel.apfelbaum@gmail.com Date: Sun, 18 Aug 2019 16:21:06 +0300 Message-Id: <20190818132107.18181-2-yuval.shaia@oracle.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190818132107.18181-1-yuval.shaia@oracle.com> References: <20190818132107.18181-1-yuval.shaia@oracle.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9352 signatures=668684 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1906280000 definitions=main-1908180148 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9352 signatures=668684 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1011 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1906280000 definitions=main-1908180148 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [generic] X-Received-From: 156.151.31.86 Subject: [Qemu-devel] [PATCH 1/2] configure: Check if we can use ibv_reg_mr_iova X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" 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 --- configure | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/configure b/configure index 714e7fb6a1..e8e4a57b6f 100755 --- a/configure +++ b/configure @@ -3205,6 +3205,34 @@ else pvrdma=3D"no" fi =20 +# Let's see if enhanced reg_mr is supported +if test "$pvrdma" =3D "yes" ; then + +cat > $TMPC < + +int +main(void) +{ + struct ibv_mr *mr; + struct ibv_pd *pd =3D NULL; + size_t length =3D 10; + uint64_t iova =3D 0; + int access =3D 0; + void *addr =3D NULL; + + mr =3D ibv_reg_mr_iova(pd, addr, length, iova, access); + + ibv_dereg_mr(mr); + + return 0; +} +EOF + if ! compile_prog "" "-libverbs"; then + QEMU_CFLAGS=3D"$QEMU_CFLAGS -DLEGACY_RDMA_REG_MR" + fi +fi + ########################################## # VNC SASL detection if test "$vnc" =3D "yes" && test "$vnc_sasl" !=3D "no" ; then --=20 2.20.1