From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id CE978A04F0 for ; Tue, 10 Dec 2019 16:00:12 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id C33E01B9B7; Tue, 10 Dec 2019 16:00:12 +0100 (CET) Received: from us-smtp-delivery-1.mimecast.com (us-smtp-2.mimecast.com [207.211.31.81]) by dpdk.org (Postfix) with ESMTP id D08471BC25 for ; Tue, 10 Dec 2019 16:00:10 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1575990010; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=W1ctCq4n1/LhBdYtZSQJEtZX6qFqyDk9F1DP3dDWbSw=; b=J46P24fnnkPOvMX/BuHOItr/nGqF/54R8u+cAb760gkAH4INh1Nl4u6sN/+EU0uPoqRVtq vGzdPkoKo0dLncIXPTjx2UrHKQPh4pTfqtV3wfbHzoWaZmhyPtw/hLJpK92+S32tDNS8u+ FNEnsSN9vcMlZHBFWQ6JelN2mXE7Bqw= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-427-DOuobJoIPtGCFZ572n_z1Q-1; Tue, 10 Dec 2019 10:00:09 -0500 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 07B2D800D41; Tue, 10 Dec 2019 15:00:08 +0000 (UTC) Received: from rh.redhat.com (ovpn-116-64.ams2.redhat.com [10.36.116.64]) by smtp.corp.redhat.com (Postfix) with ESMTP id AA3EA5DA7D; Tue, 10 Dec 2019 15:00:06 +0000 (UTC) From: Kevin Traynor To: Adrian Moreno Cc: Tiwei Bie , Maxime Coquelin , dpdk stable Date: Tue, 10 Dec 2019 14:58:39 +0000 Message-Id: <20191210145937.32755-5-ktraynor@redhat.com> In-Reply-To: <20191210145937.32755-1-ktraynor@redhat.com> References: <20191210145937.32755-1-ktraynor@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-MC-Unique: DOuobJoIPtGCFZ572n_z1Q-1 X-Mimecast-Spam-Score: 0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Subject: [dpdk-stable] patch 'vhost: prevent zero copy mode if IOMMU is on' has been queued to LTS release 18.11.6 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" Hi, FYI, your patch has been queued to LTS release 18.11.6 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 12/16/19. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasi= ng (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/kevintraynor/dpdk-stable-queue This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable-queue/commit/798db9cf64613094c8= ba3f8a59a52cc5b283f711 Thanks. Kevin. --- >From 798db9cf64613094c8ba3f8a59a52cc5b283f711 Mon Sep 17 00:00:00 2001 From: Adrian Moreno Date: Wed, 9 Oct 2019 13:54:32 +0200 Subject: [PATCH] vhost: prevent zero copy mode if IOMMU is on [ upstream commit c49197ff29fbd67e19a927683b7100dba602718d ] The simultaneous use of dequeue_zero_copy and IOMMU is problematic. Not only because IOVA_VA mode is not supported but also because the potential invalidation of guest pages while the buffers are in use, is not handled. Prevent these two features to be enabled simultaneously. Fixes: 69c90e98f483 ("vhost: enable IOMMU support") Signed-off-by: Adrian Moreno Reviewed-by: Tiwei Bie Reviewed-by: Maxime Coquelin --- lib/librte_vhost/socket.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/librte_vhost/socket.c b/lib/librte_vhost/socket.c index 097995166..9a674956f 100644 --- a/lib/librte_vhost/socket.c +++ b/lib/librte_vhost/socket.c @@ -858,4 +858,12 @@ rte_vhost_driver_register(const char *path, uint64_t f= lags) =09vsocket->dequeue_zero_copy =3D flags & RTE_VHOST_USER_DEQUEUE_ZERO_COPY= ; =20 +=09if (vsocket->dequeue_zero_copy && +=09 (flags & RTE_VHOST_USER_IOMMU_SUPPORT)) { +=09=09RTE_LOG(ERR, VHOST_CONFIG, +=09=09=09"error: enabling dequeue zero copy and IOMMU features " +=09=09=09"simultaneously is not supported\n"); +=09=09goto out_mutex; +=09} + =09/* =09 * Set the supported features correctly for the builtin vhost-user --=20 2.21.0 --- Diff of the applied patch vs upstream commit (please double-check if non-= empty: --- --- -=092019-12-10 14:49:39.447217096 +0000 +++ 0005-vhost-prevent-zero-copy-mode-if-IOMMU-is-on.patch=092019-12-10 14:= 49:38.987458980 +0000 @@ -1 +1 @@ -From c49197ff29fbd67e19a927683b7100dba602718d Mon Sep 17 00:00:00 2001 +From 798db9cf64613094c8ba3f8a59a52cc5b283f711 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit c49197ff29fbd67e19a927683b7100dba602718d ] + @@ -14 +15,0 @@ -Cc: stable@dpdk.org @@ -24 +25 @@ -index 274988c4d..810049c15 100644 +index 097995166..9a674956f 100644 @@ -27 +28 @@ -@@ -872,4 +872,12 @@ rte_vhost_driver_register(const char *path, uint64_t = flags) +@@ -858,4 +858,12 @@ rte_vhost_driver_register(const char *path, uint64_t = flags)