[dpdk-stable] patch 'vhost: fix virtqueue not accessible' has been queued to LTS release 18.11.6

Kevin Traynor ktraynor at redhat.com
Tue Dec 10 15:58:38 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/c287794db0d7043dfea64b66c059899009ba232e

Thanks.

Kevin.

---
>From c287794db0d7043dfea64b66c059899009ba232e Mon Sep 17 00:00:00 2001
From: Marvin Liu <yong.liu at intel.com>
Date: Mon, 4 Nov 2019 18:13:22 +0800
Subject: [PATCH] vhost: fix virtqueue not accessible

[ upstream commit bc42ca1787233617e5ce8a848e268784884a8d07 ]

Log feature is disabled in vhost user, so that log address was invalid
when checking. Check whether log address is valid can work around it.
Log address should also be translated in packed ring virtqueue.

Fixes: fbda9f145927 ("vhost: translate incoming log address to GPA")

Signed-off-by: Marvin Liu <yong.liu at intel.com>
Reviewed-by: Adrian Moreno <amorenoz at redhat.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin at redhat.com>
---
 lib/librte_vhost/vhost_user.c | 20 +++++++++++---------
 1 file changed, 11 insertions(+), 9 deletions(-)

diff --git a/lib/librte_vhost/vhost_user.c b/lib/librte_vhost/vhost_user.c
index 6cc842447..1e148fb45 100644
--- a/lib/librte_vhost/vhost_user.c
+++ b/lib/librte_vhost/vhost_user.c
@@ -671,9 +671,19 @@ translate_ring_addresses(struct virtio_net *dev, int vq_index)
 	uint64_t len, expected_len;
 
+	if (addr->flags & (1 << VHOST_VRING_F_LOG)) {
+		vq->log_guest_addr =
+			translate_log_addr(dev, vq, addr->log_guest_addr);
+		if (vq->log_guest_addr == 0) {
+			RTE_LOG(DEBUG, VHOST_CONFIG,
+				"(%d) failed to map log_guest_addr.\n",
+				dev->vid);
+			return dev;
+		}
+	}
+
 	if (vq_is_packed(dev)) {
 		len = sizeof(struct vring_packed_desc) * vq->size;
 		vq->desc_packed = (struct vring_packed_desc *)(uintptr_t)
 			ring_addr_to_vva(dev, vq, addr->desc_user_addr, &len);
-		vq->log_guest_addr = 0;
 		if (vq->desc_packed == NULL ||
 				len != sizeof(struct vring_packed_desc) *
@@ -771,12 +781,4 @@ translate_ring_addresses(struct virtio_net *dev, int vq_index)
 	}
 
-	vq->log_guest_addr =
-		translate_log_addr(dev, vq, addr->log_guest_addr);
-	if (vq->log_guest_addr == 0) {
-		RTE_LOG(DEBUG, VHOST_CONFIG,
-			"(%d) failed to map log_guest_addr .\n",
-			dev->vid);
-		return dev;
-	}
 	vq->access_ok = 1;
 
-- 
2.21.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-12-10 14:49:39.375703665 +0000
+++ 0004-vhost-fix-virtqueue-not-accessible.patch	2019-12-10 14:49:38.986458998 +0000
@@ -1 +1 @@
-From bc42ca1787233617e5ce8a848e268784884a8d07 Mon Sep 17 00:00:00 2001
+From c287794db0d7043dfea64b66c059899009ba232e Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit bc42ca1787233617e5ce8a848e268784884a8d07 ]
+
@@ -11 +12,0 @@
-Cc: stable at dpdk.org
@@ -21 +22 @@
-index 3f649c802..cc660e03a 100644
+index 6cc842447..1e148fb45 100644
@@ -24 +25 @@
-@@ -654,9 +654,19 @@ translate_ring_addresses(struct virtio_net *dev, int vq_index)
+@@ -671,9 +671,19 @@ translate_ring_addresses(struct virtio_net *dev, int vq_index)
@@ -45 +46 @@
-@@ -754,12 +764,4 @@ translate_ring_addresses(struct virtio_net *dev, int vq_index)
+@@ -771,12 +781,4 @@ translate_ring_addresses(struct virtio_net *dev, int vq_index)



More information about the stable mailing list