[dpdk-stable] patch 'vhost: prevent zero copy mode if IOMMU is on' has been queued to LTS release 18.11.6

Kevin Traynor ktraynor at redhat.com
Tue Dec 10 15:58:39 CET 2019


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 rebasing
(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/798db9cf64613094c8ba3f8a59a52cc5b283f711

Thanks.

Kevin.

---
>From 798db9cf64613094c8ba3f8a59a52cc5b283f711 Mon Sep 17 00:00:00 2001
From: Adrian Moreno <amorenoz at redhat.com>
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 <amorenoz at redhat.com>
Reviewed-by: Tiwei Bie <tiwei.bie at intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin at redhat.com>
---
 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 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
-- 
2.21.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-12-10 14:49:39.447217096 +0000
+++ 0005-vhost-prevent-zero-copy-mode-if-IOMMU-is-on.patch	2019-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 at 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)



More information about the stable mailing list