#1109776 Support for non-4kB pages in Xe driver

Package:
src:linux
Source:
src:linux
Submitter:
Simon Richter
Date:
2025-09-18 06:07:01 UTC
Severity:
normal
Tags:
#1109776#5
Date:
2025-07-23 15:45:39 UTC
From:
To:
Package: src:linux
Version: 6.12.35-1
Severity: normal
Tags: patch
X-Debbugs-Cc: debian-arm@lists.debian.org, debian-powerpc@lists.debian.org, sjr@debian.org
User: debian-arm@lists.debian.org
Usertags: arm64
User: debian-powerpc@lists.debian.org
Usertags: ppc64el

Hi,

this is a set of backported patches to make the Xe driver in the stable
kernel not Oops when run on a machine with a page size that isn't 4k.

This is most likely relevant on arm64 (16k) and ppc64el (64k). These should
not cause any code changes when compiling with 4k page sizes, as they just
replace a bunch of PAGE_SIZE with an appropriate definition that evaluates
to 4096.

   Simon

#1109776#10
Date:
2025-07-23 15:59:41 UTC
From:
To:
Control: tags -1 moreinfo

I see that patches on stable@, we won't take patches that can go this
way usually.

Bastian

#1109776#17
Date:
2025-07-23 16:38:25 UTC
From:
To:
Hi,

The full patchset[1] for later kernels has a bunch of extra changes, but
the stable kernel is old enough that we can get by with a number of
simple substitutions:
  - replace SZ_4K with PAGE_SIZE when finding an alignment palatable to
the CPU
  - replace PAGE_SIZE with SZ_4K when describing a memory layout in GPU
memory that uses 4k alignment regardless of host page size.

So on 4k, where PAGE_SIZE *is* SZ_4K, this does nothing, but it fixes
the Oops on boot for 16k (aarch64, loong64) and 64k (ppc64le) users.

Since these are derived from the proper fix, you can easily see when
they are no longer required.

    Simon

[1]
https://lore.kernel.org/all/20250604-upstream-xe-non-4k-v2-v2-0-ce7905da7b08@aosc.io/

#1109776#22
Date:
2025-07-23 19:37:24 UTC
From:
To:
Control: Forwarded -1 https://lore.kernel.org/all/20250723074540.2660-1-Simon.Richter@hogyros.de/

You could've mentioned that ...

#1109776#29
Date:
2025-07-24 01:39:16 UTC
From:
To:
Hi,

They're not my fixes, all I did upstream was retrigger CI because it
showed a conflict.

But yes, these patches are already queued upstream (although they are
larger there, because some of the places near the "FIXME" actually got
fixed in the meantime). Sorry for not making that clear.

    Simon

#1109776#34
Date:
2025-07-24 19:57:32 UTC
From:
To:
I don't see them in drm-misc.  Once the corresponding patches are
applied upstream, please send the backported patches here with proper
headers:

- "Bug-Debian" header pointing to this bug report
- "Origin" header pointing to the source of the backport (Git forge or
  mail archive)
- Include the upstream commit messages and commit hashes in the commit
  meesage, in addition to the current notes about backporting

Ben.

#1109776#39
Date:
2025-07-27 04:27:36 UTC
From:
To:
This driver, for the time being, assumes that the kernel page size is 4kB,
so it fails on loong64 and aarch64 with 16kB pages, and ppc64el with 64kB
pages.
---
 drivers/gpu/drm/xe/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/xe/Kconfig b/drivers/gpu/drm/xe/Kconfig
index 2bb2bc052120..7c9f1de7b35f 100644
--- a/drivers/gpu/drm/xe/Kconfig
+++ b/drivers/gpu/drm/xe/Kconfig
@@ -1,7 +1,7 @@
 # SPDX-License-Identifier: GPL-2.0-only
 config DRM_XE
 	tristate "Intel Xe2 Graphics"
-	depends on DRM && PCI
+	depends on DRM && PCI && (PAGE_SIZE_4KB || BROKEN)
 	depends on KUNIT || !KUNIT
 	depends on INTEL_VSEC || !INTEL_VSEC
 	depends on X86_PLATFORM_DEVICES || !(X86 && ACPI)

#1109776#44
Date:
2025-07-27 04:27:35 UTC
From:
To:
Hi,

until either of

 - https://patchwork.freedesktop.org/series/150230/

or the (same but rebased)

 - https://patchwork.freedesktop.org/series/151983/

goes in, the xe module will Oops on insmod when kernel page size is not 4kB.
This disables the module for the time being, and should be reverted for fixed
versions.

This should probably also be added to the stable kernel series which will
likely not receive the fix.

Simon Richter (1):
  Mark xe driver as BROKEN if kernel page size is not 4kB

 drivers/gpu/drm/xe/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

#1109776#49
Date:
2025-07-27 05:28:18 UTC
From:
To:
<formletter>

This is not the correct way to submit patches for inclusion in the
stable kernel tree.  Please read:
https://www.kernel.org/doc/html/latest/process/stable-kernel-rules.html
for how to do this properly.

</formletter>

#1109776#54
Date:
2025-09-18 06:04:32 UTC
From:
To:
*你好!*

无论是对目前的工作和报酬感到厌倦希望改行,还是待业中寻找进入某行业的求职“敲门砖”,在新领域获得相关结业认证都会使你面对未来时信心满满。

而实际上,有一些技能学习起来并不需要那么长的时间,能够很快入手,而且薪水并不低,就业前景也很广阔。

这篇文章指出了9种在一年内可以学会并获得专业认证的赚钱技能。

要阅读完整文章,请点击下面的链接:

https://simpleurl.link/9-zhong-zhuanqian-jineng

祝你一切都好!
--- 追寻真相,是对良知最好的尊重