From 796dbed3bfecac2eb4e4111ae1f3165dbad87982 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Sat, 2 Sep 2023 10:20:35 +0200 Subject: [PATCH] 6.5-stable patches added patches: drm-amdgpu-correct-vmhub-index-in-gmc-v10-11.patch erofs-ensure-that-the-post-eof-tails-are-all-zeroed.patch series --- ...pu-correct-vmhub-index-in-gmc-v10-11.patch | 51 +++++++++++++++++++ ...at-the-post-eof-tails-are-all-zeroed.patch | 50 ++++++++++++++++++ queue-6.5/series | 2 + 3 files changed, 103 insertions(+) create mode 100644 queue-6.5/drm-amdgpu-correct-vmhub-index-in-gmc-v10-11.patch create mode 100644 queue-6.5/erofs-ensure-that-the-post-eof-tails-are-all-zeroed.patch create mode 100644 queue-6.5/series diff --git a/queue-6.5/drm-amdgpu-correct-vmhub-index-in-gmc-v10-11.patch b/queue-6.5/drm-amdgpu-correct-vmhub-index-in-gmc-v10-11.patch new file mode 100644 index 00000000000..84219dafa5f --- /dev/null +++ b/queue-6.5/drm-amdgpu-correct-vmhub-index-in-gmc-v10-11.patch @@ -0,0 +1,51 @@ +From 6f38bdb86a056707b9ecb09e3b44adedc8e8d8a0 Mon Sep 17 00:00:00 2001 +From: Lang Yu +Date: Wed, 26 Jul 2023 19:04:25 +0800 +Subject: drm/amdgpu: correct vmhub index in GMC v10/11 + +From: Lang Yu + +commit 6f38bdb86a056707b9ecb09e3b44adedc8e8d8a0 upstream. + +Align with new vmhub definition. + +v2: use client_id == VMC to decide vmhub(Hawking) + +Link: https://gitlab.freedesktop.org/drm/amd/-/issues/2822 +Signed-off-by: Lang Yu +Reviewed-by: Hawking Zhang +Signed-off-by: Alex Deucher +Signed-off-by: Greg Kroah-Hartman +--- + drivers/gpu/drm/amd/amdgpu/gmc_v10_0.c | 4 +++- + drivers/gpu/drm/amd/amdgpu/gmc_v11_0.c | 4 +++- + 2 files changed, 6 insertions(+), 2 deletions(-) + +--- a/drivers/gpu/drm/amd/amdgpu/gmc_v10_0.c ++++ b/drivers/gpu/drm/amd/amdgpu/gmc_v10_0.c +@@ -109,9 +109,11 @@ static int gmc_v10_0_process_interrupt(s + struct amdgpu_irq_src *source, + struct amdgpu_iv_entry *entry) + { ++ uint32_t vmhub_index = entry->client_id == SOC15_IH_CLIENTID_VMC ? ++ AMDGPU_MMHUB0(0) : AMDGPU_GFXHUB(0); ++ struct amdgpu_vmhub *hub = &adev->vmhub[vmhub_index]; + bool retry_fault = !!(entry->src_data[1] & 0x80); + bool write_fault = !!(entry->src_data[1] & 0x20); +- struct amdgpu_vmhub *hub = &adev->vmhub[entry->vmid_src]; + struct amdgpu_task_info task_info; + uint32_t status = 0; + u64 addr; +--- a/drivers/gpu/drm/amd/amdgpu/gmc_v11_0.c ++++ b/drivers/gpu/drm/amd/amdgpu/gmc_v11_0.c +@@ -97,7 +97,9 @@ static int gmc_v11_0_process_interrupt(s + struct amdgpu_irq_src *source, + struct amdgpu_iv_entry *entry) + { +- struct amdgpu_vmhub *hub = &adev->vmhub[entry->vmid_src]; ++ uint32_t vmhub_index = entry->client_id == SOC21_IH_CLIENTID_VMC ? ++ AMDGPU_MMHUB0(0) : AMDGPU_GFXHUB(0); ++ struct amdgpu_vmhub *hub = &adev->vmhub[vmhub_index]; + uint32_t status = 0; + u64 addr; + diff --git a/queue-6.5/erofs-ensure-that-the-post-eof-tails-are-all-zeroed.patch b/queue-6.5/erofs-ensure-that-the-post-eof-tails-are-all-zeroed.patch new file mode 100644 index 00000000000..649dcf1d381 --- /dev/null +++ b/queue-6.5/erofs-ensure-that-the-post-eof-tails-are-all-zeroed.patch @@ -0,0 +1,50 @@ +From hsiangkao@linux.alibaba.com Sat Sep 2 09:30:52 2023 +From: Gao Xiang +Date: Thu, 31 Aug 2023 19:29:58 +0800 +Subject: erofs: ensure that the post-EOF tails are all zeroed +To: stable@vger.kernel.org, Greg Kroah-Hartman +Cc: linux-erofs@lists.ozlabs.org, Gao Xiang , keltargw +Message-ID: <20230831112959.99884-6-hsiangkao@linux.alibaba.com> + +From: Gao Xiang + +commit e4c1cf523d820730a86cae2c6d55924833b6f7ac upstream. + +This was accidentally fixed up in commit e4c1cf523d82 but we can't +take the full change due to other dependancy issues, so here is just +the actual bugfix that is needed. + +[Background] + +keltargw reported an issue [1] that with mmaped I/Os, sometimes the +tail of the last page (after file ends) is not filled with zeroes. + +The root cause is that such tail page could be wrongly selected for +inplace I/Os so the zeroed part will then be filled with compressed +data instead of zeroes. + +A simple fix is to avoid doing inplace I/Os for such tail parts, +actually that was already fixed upstream in commit e4c1cf523d82 +("erofs: tidy up z_erofs_do_read_page()") by accident. + +[1] https://lore.kernel.org/r/3ad8b469-25db-a297-21f9-75db2d6ad224@linux.alibaba.com + +Reported-by: keltargw +Fixes: 3883a79abd02 ("staging: erofs: introduce VLE decompression support") +Signed-off-by: Gao Xiang +Signed-off-by: Greg Kroah-Hartman +--- + fs/erofs/zdata.c | 2 ++ + 1 file changed, 2 insertions(+) + +--- a/fs/erofs/zdata.c ++++ b/fs/erofs/zdata.c +@@ -1038,6 +1038,8 @@ hitted: + cur = end - min_t(erofs_off_t, offset + end - map->m_la, end); + if (!(map->m_flags & EROFS_MAP_MAPPED)) { + zero_user_segment(page, cur, end); ++ ++spiltted; ++ tight = false; + goto next_part; + } + if (map->m_flags & EROFS_MAP_FRAGMENT) { diff --git a/queue-6.5/series b/queue-6.5/series new file mode 100644 index 00000000000..15a593a37f2 --- /dev/null +++ b/queue-6.5/series @@ -0,0 +1,2 @@ +drm-amdgpu-correct-vmhub-index-in-gmc-v10-11.patch +erofs-ensure-that-the-post-eof-tails-are-all-zeroed.patch -- 2.47.3