Public bug reported:

Commit 86e6815b316e ("x86/mm: Change cpa_flush() to call
flush_kernel_range() directly") makes cpa_flush() invalidate the kernel
TLB over one range: from the first page's address, numpages long. For
CPA_PAGES_ARRAY / CPA_ARRAY requests whose pages are not virtually
contiguous, that range misses pages 1..n-1. Their write-back TLB entries
survive a change to UC/WC whenever numpages <=
tlb_single_page_flush_ceiling (33). Above the ceiling the full flush
hides it.

Mainline fixed this in a39a7014825b (Fixes: 86e6815b316e; found as an
i915 regression). It carries no Cc: stable, and the 7.0 kernels we run
still have the range flush.

We hit it through a different driver and measured it directly. A GPU
copying from freshly allocated uncached host memory reads stale zero
cache lines at exactly the page counts the code predicts. A CPU cache-
line flush of the staging before the writes reduces the loss about
twentyfold (4 of 360,000 against 86 at 60 devices); a flush after the
writes, just before the copy, removed it (0 of 360,000 against 77). In a
small cell, a 100 ms wait before the copy removed it (0 of 600).

Details attached.

ProblemType: Bug
DistroRelease: Ubuntu 24.04
Package: linux-image-7.0.0-43-generic 7.0.0-43.43~24.04.1
ProcVersionSignature: Ubuntu 7.0.0-43.43~24.04.1-generic 7.0.14
Uname: Linux 7.0.0-43-generic x86_64
NonfreeKernelModules: zfs
ApportVersion: 2.28.3-0ubuntu0.1
Architecture: amd64
AudioDevicesInUse:
 USER        PID ACCESS COMMAND
 /dev/snd/controlC1:  soul       3337 F.... wireplumber
 /dev/snd/controlC0:  soul       3337 F.... wireplumber
 /dev/snd/seq:        soul       3334 F.... pipewire
CRDA: N/A
CasperMD5CheckResult: pass
CurrentDesktop: ubuntu:GNOME
Date: Sat Nov 14 21:56:43 2026
InstallationDate: Installed on 2026-10-13 (33 days ago)
InstallationMedia: Ubuntu-Server 24.04.3 LTS "Noble Numbat" - Release amd64 
(20250805.1)
MachineType: Gigabyte Technology Co., Ltd. X570 AORUS ELITE WIFI
ProcEnviron:
 LANG=en_US.UTF-8
 PATH=(custom, no user)
 SHELL=/bin/bash
 TERM=xterm-256color
 XDG_RUNTIME_DIR=<set>
ProcFB: 0 nvidia-drmdrmfb
ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-7.0.0-43-generic 
root=UUID=60d29a24-9b67-4e7b-9f48-8f7c377ff6cf ro
RelatedPackageVersions:
 linux-restricted-modules-7.0.0-43-generic N/A
 linux-backports-modules-7.0.0-43-generic  N/A
 linux-firmware                            20240318.git3b128b60.0ubuntu3.1
SourcePackage: linux-hwe-7.0
UpgradeStatus: No upgrade log present (probably fresh install)
dmi.bios.date: 09/02/2024
dmi.bios.release: 5.17
dmi.bios.vendor: American Megatrends International, LLC.
dmi.bios.version: F40d
dmi.board.asset.tag: Default string
dmi.board.name: X570 AORUS ELITE WIFI
dmi.board.vendor: Gigabyte Technology Co., Ltd.
dmi.board.version: Default string
dmi.chassis.asset.tag: Default string
dmi.chassis.type: 3
dmi.chassis.vendor: Default string
dmi.chassis.version: Default string
dmi.modalias: 
dmi:bvnAmericanMegatrendsInternational,LLC.:bvrF40d:bd09/02/2024:br5.17:svnGigabyteTechnologyCo.,Ltd.:pnX570AORUSELITEWIFI:pvr-CF:rvnGigabyteTechnologyCo.,Ltd.:rnX570AORUSELITEWIFI:rvrDefaultstring:cvnDefaultstring:ct3:cvrDefaultstring:skuDefaultstring:pfaX570MB:
dmi.product.family: X570 MB
dmi.product.name: X570 AORUS ELITE WIFI
dmi.product.sku: Default string
dmi.product.version: -CF
dmi.sys.vendor: Gigabyte Technology Co., Ltd.

** Affects: linux-hwe-7.0 (Ubuntu)
     Importance: Undecided
         Status: New


** Tags: amd64 apport-bug noble

** Attachment added: "Full description in markdown"
   
https://bugs.launchpad.net/bugs/2174496/+attachment/6018164/+files/POST_ubuntu_request.txt

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2174496

Title:
  stale write-back TLB entries after set_pages_array_uc() on scattered
  pages

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/linux-hwe-7.0/+bug/2174496/+subscriptions


-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to