From fed51d769834d7cae7e258bbda9227047faced02 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Fri, 26 Jan 2024 17:22:37 -0800 Subject: [PATCH] 6.1-stable patches added patches: rdma-irdma-ensure-iwarp-qp-queue-memory-is-os-paged-aligned.patch rdma-irdma-fix-support-for-64k-pages.patch revert-drm-amd-enable-pcie-pme-from-d3.patch --- ...-qp-queue-memory-is-os-paged-aligned.patch | 40 +++++++++++++++++++ ...rdma-irdma-fix-support-for-64k-pages.patch | 36 +++++++++++++++++ ...vert-drm-amd-enable-pcie-pme-from-d3.patch | 33 +++++++++++++++ queue-6.1/series | 3 ++ 4 files changed, 112 insertions(+) create mode 100644 queue-6.1/rdma-irdma-ensure-iwarp-qp-queue-memory-is-os-paged-aligned.patch create mode 100644 queue-6.1/rdma-irdma-fix-support-for-64k-pages.patch create mode 100644 queue-6.1/revert-drm-amd-enable-pcie-pme-from-d3.patch diff --git a/queue-6.1/rdma-irdma-ensure-iwarp-qp-queue-memory-is-os-paged-aligned.patch b/queue-6.1/rdma-irdma-ensure-iwarp-qp-queue-memory-is-os-paged-aligned.patch new file mode 100644 index 00000000000..2956614c05d --- /dev/null +++ b/queue-6.1/rdma-irdma-ensure-iwarp-qp-queue-memory-is-os-paged-aligned.patch @@ -0,0 +1,40 @@ +From 0a5ec366de7e94192669ba08de6ed336607fd282 Mon Sep 17 00:00:00 2001 +From: Mike Marciniszyn +Date: Wed, 29 Nov 2023 14:21:42 -0600 +Subject: RDMA/irdma: Ensure iWarp QP queue memory is OS paged aligned + +From: Mike Marciniszyn + +commit 0a5ec366de7e94192669ba08de6ed336607fd282 upstream. + +The SQ is shared for between kernel and used by storing the kernel page +pointer and passing that to a kmap_atomic(). + +This then requires that the alignment is PAGE_SIZE aligned. + +Fix by adding an iWarp specific alignment check. + +Fixes: e965ef0e7b2c ("RDMA/irdma: Split QP handler into irdma_reg_user_mr_type_qp") +Link: https://lore.kernel.org/r/20231129202143.1434-3-shiraz.saleem@intel.com +Signed-off-by: Mike Marciniszyn +Signed-off-by: Shiraz Saleem +Signed-off-by: Jason Gunthorpe +Signed-off-by: Greg Kroah-Hartman +--- + drivers/infiniband/hw/irdma/verbs.c | 5 +++++ + 1 file changed, 5 insertions(+) + +--- a/drivers/infiniband/hw/irdma/verbs.c ++++ b/drivers/infiniband/hw/irdma/verbs.c +@@ -2845,6 +2845,11 @@ static struct ib_mr *irdma_reg_user_mr(s + + switch (req.reg_type) { + case IRDMA_MEMREG_TYPE_QP: ++ /* iWarp: Catch page not starting on OS page boundary */ ++ if (!rdma_protocol_roce(&iwdev->ibdev, 1) && ++ ib_umem_offset(iwmr->region)) ++ return -EINVAL; ++ + total = req.sq_pages + req.rq_pages + shadow_pgcnt; + if (total > iwmr->page_cnt) { + err = -EINVAL; diff --git a/queue-6.1/rdma-irdma-fix-support-for-64k-pages.patch b/queue-6.1/rdma-irdma-fix-support-for-64k-pages.patch new file mode 100644 index 00000000000..c1ee2b04a3e --- /dev/null +++ b/queue-6.1/rdma-irdma-fix-support-for-64k-pages.patch @@ -0,0 +1,36 @@ +From 03769f72d66edab82484449ed594cb6b00ae0223 Mon Sep 17 00:00:00 2001 +From: Mike Marciniszyn +Date: Wed, 29 Nov 2023 14:21:43 -0600 +Subject: RDMA/irdma: Fix support for 64k pages + +From: Mike Marciniszyn + +commit 03769f72d66edab82484449ed594cb6b00ae0223 upstream. + +Virtual QP and CQ require a 4K HW page size but the driver passes +PAGE_SIZE to ib_umem_find_best_pgsz() instead. + +Fix this by using the appropriate 4k value in the bitmap passed to +ib_umem_find_best_pgsz(). + +Fixes: 693a5386eff0 ("RDMA/irdma: Split mr alloc and free into new functions") +Link: https://lore.kernel.org/r/20231129202143.1434-4-shiraz.saleem@intel.com +Signed-off-by: Mike Marciniszyn +Signed-off-by: Shiraz Saleem +Signed-off-by: Jason Gunthorpe +Signed-off-by: Greg Kroah-Hartman +--- + drivers/infiniband/hw/irdma/verbs.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/infiniband/hw/irdma/verbs.c ++++ b/drivers/infiniband/hw/irdma/verbs.c +@@ -2825,7 +2825,7 @@ static struct ib_mr *irdma_reg_user_mr(s + iwmr->ibmr.pd = pd; + iwmr->ibmr.device = pd->device; + iwmr->ibmr.iova = virt; +- iwmr->page_size = PAGE_SIZE; ++ iwmr->page_size = SZ_4K;; + + if (req.reg_type == IRDMA_MEMREG_TYPE_MEM) { + iwmr->page_size = ib_umem_find_best_pgsz(region, diff --git a/queue-6.1/revert-drm-amd-enable-pcie-pme-from-d3.patch b/queue-6.1/revert-drm-amd-enable-pcie-pme-from-d3.patch new file mode 100644 index 00000000000..58d8d21c1c3 --- /dev/null +++ b/queue-6.1/revert-drm-amd-enable-pcie-pme-from-d3.patch @@ -0,0 +1,33 @@ +From stable+bounces-16049-greg=kroah.com@vger.kernel.org Fri Jan 26 17:00:28 2024 +From: Jonathan Gray +Date: Sat, 27 Jan 2024 12:00:07 +1100 +Subject: Revert "drm/amd: Enable PCIe PME from D3" +To: gregkh@linuxfoundation.org +Cc: mario.limonciello@amd.com, stable@vger.kernel.org +Message-ID: <20240127010007.77686-1-jsg@jsg.id.au> + +From: Jonathan Gray + +This reverts commit 0c8d252d0a20a412ec30859afef6393aecfdd3cd. + +duplicated a change made in 6.1.66 +c6088429630048661e480ed28590e69a48c102d6 + +Cc: stable@vger.kernel.org # 6.1 +Signed-off-by: Jonathan Gray +Signed-off-by: Greg Kroah-Hartman +--- + drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 2 -- + 1 file changed, 2 deletions(-) + +--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c ++++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c +@@ -2202,8 +2202,6 @@ retry_init: + + pci_wake_from_d3(pdev, TRUE); + +- pci_wake_from_d3(pdev, TRUE); +- + /* + * For runpm implemented via BACO, PMFW will handle the + * timing for BACO in and out: diff --git a/queue-6.1/series b/queue-6.1/series index d403799e26a..f4abaa31f98 100644 --- a/queue-6.1/series +++ b/queue-6.1/series @@ -73,3 +73,6 @@ ksmbd-fix-potential-circular-locking-issue-in-smb2_set_ea.patch ksmbd-don-t-increment-epoch-if-current-state-and-request-state-are-same.patch ksmbd-send-lease-break-notification-on-file_rename_information.patch ksmbd-add-missing-set_freezable-for-freezable-kthread.patch +rdma-irdma-ensure-iwarp-qp-queue-memory-is-os-paged-aligned.patch +rdma-irdma-fix-support-for-64k-pages.patch +revert-drm-amd-enable-pcie-pme-from-d3.patch -- 2.47.3