From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 4B766427EF for ; Wed, 22 Mar 2023 11:32:39 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 475F74282D; Wed, 22 Mar 2023 11:32:39 +0100 (CET) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mails.dpdk.org (Postfix) with ESMTP id F2A1340E09 for ; Wed, 22 Mar 2023 11:32:36 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1679481156; 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=B5qfI0YJIanWsQG3agtiFWCuYGYDBBD7D9NvJOlXR80=; b=QEq1hsQ1QcspuS3YH5r7MStB6pruv9n5AocNVbEoRzO7DZPDdHrQkQssJ/ItUQe8oEks0L bI2ZegfeOqS3+eUF9tlr8UYC81Iwbe6viEtNgbS/dj3cxci3fUC6RqCsLMtL+iUl7IeSaF DI8BHIBK10ZTnPSP4QI7n+YdXRPrluQ= Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-575-mH0MdnivNrSByD1PoK7rAw-1; Wed, 22 Mar 2023 06:32:35 -0400 X-MC-Unique: mH0MdnivNrSByD1PoK7rAw-1 Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 123422808E6A; Wed, 22 Mar 2023 10:32:35 +0000 (UTC) Received: from rh.redhat.com (unknown [10.39.192.69]) by smtp.corp.redhat.com (Postfix) with ESMTP id E2BE2492C13; Wed, 22 Mar 2023 10:32:33 +0000 (UTC) From: Kevin Traynor To: David Marchand Cc: Maxime Coquelin , Andy Pei , Chenbo Xia , dpdk stable Subject: patch 'net/virtio: remove address width limit for modern devices' has been queued to stable release 21.11.4 Date: Wed, 22 Mar 2023 10:31:59 +0000 Message-Id: <20230322103209.456098-12-ktraynor@redhat.com> In-Reply-To: <20230322103209.456098-1-ktraynor@redhat.com> References: <20230322103209.456098-1-ktraynor@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.9 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII"; x-default=true X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 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 Hi, FYI, your patch has been queued to stable release 21.11.4 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 03/24/23. 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 This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/f5922d3d3da7cb495de9092fdb3ea59ff5e30524 Thanks. Kevin --- >From f5922d3d3da7cb495de9092fdb3ea59ff5e30524 Mon Sep 17 00:00:00 2001 From: David Marchand Date: Tue, 14 Mar 2023 09:53:34 +0100 Subject: [PATCH] net/virtio: remove address width limit for modern devices [ upstream commit 8b76b3a0d327f6bedc1343149e03619337ab0408 ] Modern devices don't have the same limitation as legacy devices, because vring addresses are not configured using a 32-bit register. Fixes: 6ba1f63b5ab0 ("virtio: support specification 1.0") Signed-off-by: David Marchand Reviewed-by: Maxime Coquelin Acked-by: Andy Pei Reviewed-by: Chenbo Xia --- drivers/net/virtio/virtio_pci.c | 28 ++++++++-------------------- 1 file changed, 8 insertions(+), 20 deletions(-) diff --git a/drivers/net/virtio/virtio_pci.c b/drivers/net/virtio/virtio_pci.c index 632451dcbe..46b9ba6682 100644 --- a/drivers/net/virtio/virtio_pci.c +++ b/drivers/net/virtio/virtio_pci.c @@ -34,20 +34,4 @@ struct virtio_pci_internal virtio_pci_internal[RTE_MAX_ETHPORTS]; -static inline int -check_vq_phys_addr_ok(struct virtqueue *vq) -{ - /* Virtio PCI device VIRTIO_PCI_QUEUE_PF register is 32bit, - * and only accepts 32 bit page frame number. - * Check if the allocated physical memory exceeds 16TB. - */ - if ((vq->vq_ring_mem + vq->vq_ring_size - 1) >> - (VIRTIO_PCI_QUEUE_ADDR_SHIFT + 32)) { - PMD_INIT_LOG(ERR, "vring address shouldn't be above 16TB!"); - return 0; - } - - return 1; -} - #define PCI_MSIX_ENABLE 0x8000 @@ -274,6 +258,13 @@ legacy_setup_queue(struct virtio_hw *hw, struct virtqueue *vq) uint32_t src; - if (!check_vq_phys_addr_ok(vq)) + /* Virtio PCI device VIRTIO_PCI_QUEUE_PFN register is 32bit, + * and only accepts 32 bit page frame number. + * Check if the allocated physical memory exceeds 16TB. + */ + if ((vq->vq_ring_mem + vq->vq_ring_size - 1) >> + (VIRTIO_PCI_QUEUE_ADDR_SHIFT + 32)) { + PMD_INIT_LOG(ERR, "vring address shouldn't be above 16TB!"); return -1; + } rte_pci_ioport_write(VTPCI_IO(hw), &vq->vq_queue_index, 2, @@ -477,7 +468,4 @@ modern_setup_queue(struct virtio_hw *hw, struct virtqueue *vq) uint16_t notify_off; - if (!check_vq_phys_addr_ok(vq)) - return -1; - desc_addr = vq->vq_ring_mem; avail_addr = desc_addr + vq->vq_nentries * sizeof(struct vring_desc); -- 2.39.2 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2023-03-22 10:30:08.226570524 +0000 +++ 0012-net-virtio-remove-address-width-limit-for-modern-dev.patch 2023-03-22 10:30:07.913866562 +0000 @@ -1 +1 @@ -From 8b76b3a0d327f6bedc1343149e03619337ab0408 Mon Sep 17 00:00:00 2001 +From f5922d3d3da7cb495de9092fdb3ea59ff5e30524 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 8b76b3a0d327f6bedc1343149e03619337ab0408 ] + @@ -10 +11,0 @@ -Cc: stable@dpdk.org @@ -21 +22 @@ -index 9cf4d760b4..29eb739b04 100644 +index 632451dcbe..46b9ba6682 100644