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 E62BCA04F3 for ; Thu, 19 Dec 2019 15:37:41 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id DB70F1BF92; Thu, 19 Dec 2019 15:37:41 +0100 (CET) Received: from mail-wm1-f47.google.com (mail-wm1-f47.google.com [209.85.128.47]) by dpdk.org (Postfix) with ESMTP id 9F88A1BFA5 for ; Thu, 19 Dec 2019 15:37:40 +0100 (CET) Received: by mail-wm1-f47.google.com with SMTP id f4so7184239wmj.1 for ; Thu, 19 Dec 2019 06:37:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=dFZGJ0E6dH+9BqtCYjeK8iGSwgBtJv2aL9SDof+Fxb8=; b=QOEcyO3yf6S8nFgTKmeS25Tz8GJSTn7fbPocikdC3RHr+S/5RqssUhjJYk97GwQrii vhX8DG7FkbULhPW+/RyQxf7EQL6T3ING3VXeVbubW2YPyGndDGuoL8YOXEF10/4uIzEv Aeg7fTq3oYcEfohqLLPPd4/qHlF3D4OljdWtlLQ9K7FKvjbgFTcm5j/CF5pAaLUvpNna rVONId/yrZoL9xcbW8CfyxpVuuAb+2kY3xrCfezd6DYndLUuzOJs7n8cNphAnY3o7MSV 6qYGujyqSOAeowtroaaQfL5Y4ILWVKXkxTS6zcJ8q2DFlEY2nlCNHUC5yKRsq1v3Itl0 bm7w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=dFZGJ0E6dH+9BqtCYjeK8iGSwgBtJv2aL9SDof+Fxb8=; b=id2A+A7hm5RG5OETIvSIbUOZ0xD16PqRY5C0XxQIe+Vqx6Hr3gTxRDjQiPSbMg3Uym tAR6gaarg4KCTK1U0On0Kh5nW9zYzO40UYYceaEmJ72PuKaeKpCDgo/HyBT5XrEewK2D POdfpiNme5StnwHOZVDfXKRPVf7QrOJRFDkf55/PcvoZ2kewbnTLccIlE/S+GlsmSCSG wrJmSjUuuhfBm5xKQuktAaKPaXgBDxCW0rG/Mmn+rFnv0vOt2qW30ZNx5TnxPrFjBjLG pBDh7yelhbBpJh8Tz1uAyBsqmWRmiQ6VbIIn0kmi9FYGhgFAoB3ntzGhgLw/I5PE1eWL PAEQ== X-Gm-Message-State: APjAAAU1sZbIvj1z7S8MIXkdW05JdlLyN37OARBmXLc0ja8Bn1tgq6rj vDoEf668anQJ8YXzpHzQ3wg= X-Google-Smtp-Source: APXvYqxrXO1rDu0x031gOdESLCsruB9ymjTSb7Zyqh1vty3OOPpCkzbuibQYXodgI+JZlc7Q903+fQ== X-Received: by 2002:a1c:4e10:: with SMTP id g16mr10201681wmh.94.1576766260356; Thu, 19 Dec 2019 06:37:40 -0800 (PST) Received: from localhost ([88.98.246.218]) by smtp.gmail.com with ESMTPSA id z8sm6599390wrq.22.2019.12.19.06.37.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Dec 2019 06:37:39 -0800 (PST) From: luca.boccassi@gmail.com To: Adrian Moreno Cc: Tiwei Bie , Maxime Coquelin , dpdk stable Date: Thu, 19 Dec 2019 14:33:38 +0000 Message-Id: <20191219143447.21506-71-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20191219143447.21506-1-luca.boccassi@gmail.com> References: <20191219143447.21506-1-luca.boccassi@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] patch 'vhost: prevent zero copy mode if IOMMU is on' has been queued to LTS release 17.11.10 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 17.11.10 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/21/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 rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Thanks. Luca Boccassi --- >From ab6aaeebdb71aab690ceb2aa4cf05c06c93087fd 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 2fa7ea0e09..c035b6ab5e 100644 --- a/lib/librte_vhost/socket.c +++ b/lib/librte_vhost/socket.c @@ -675,6 +675,14 @@ rte_vhost_driver_register(const char *path, uint64_t flags) } vsocket->dequeue_zero_copy = flags & RTE_VHOST_USER_DEQUEUE_ZERO_COPY; + if (vsocket->dequeue_zero_copy && + (flags & RTE_VHOST_USER_IOMMU_SUPPORT)) { + RTE_LOG(ERR, VHOST_CONFIG, + "error: enabling dequeue zero copy and IOMMU features " + "simultaneously is not supported\n"); + goto out_mutex; + } + /* * Set the supported features correctly for the builtin vhost-user * net driver. -- 2.20.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2019-12-19 14:32:29.148663283 +0000 +++ 0071-vhost-prevent-zero-copy-mode-if-IOMMU-is-on.patch 2019-12-19 14:32:26.161298936 +0000 @@ -1,8 +1,10 @@ -From c49197ff29fbd67e19a927683b7100dba602718d Mon Sep 17 00:00:00 2001 +From ab6aaeebdb71aab690ceb2aa4cf05c06c93087fd 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, @@ -11,7 +13,6 @@ Prevent these two features to be enabled simultaneously. Fixes: 69c90e98f483 ("vhost: enable IOMMU support") -Cc: stable@dpdk.org Signed-off-by: Adrian Moreno Reviewed-by: Tiwei Bie @@ -21,10 +22,10 @@ 1 file changed, 8 insertions(+) diff --git a/lib/librte_vhost/socket.c b/lib/librte_vhost/socket.c -index 274988c4d7..810049c158 100644 +index 2fa7ea0e09..c035b6ab5e 100644 --- a/lib/librte_vhost/socket.c +++ b/lib/librte_vhost/socket.c -@@ -871,6 +871,14 @@ rte_vhost_driver_register(const char *path, uint64_t flags) +@@ -675,6 +675,14 @@ rte_vhost_driver_register(const char *path, uint64_t flags) } vsocket->dequeue_zero_copy = flags & RTE_VHOST_USER_DEQUEUE_ZERO_COPY;