Fix device page migration in low memory fallback
Subsystems (6)
Matthew Brost
maintainerv3 cover Fix device page migration in low memory fallback
LLMs made my breakfast, lunch, and dinner. Not really. They served as an assistive tool while I performed the debugging, testing, and analysis needed to isolate the root cause in core MM while fixing a known DRM SVM issue involving THP allocation failures in the CPU fault-to-device page migration path.
When a CPU faults on a device private PMD and the driver cannot allocate a compound destination folio, the source THP has to be split. That path is broken: the CPU fault reference makes the split always fail, and it demotes the PMD only in the faulting VMA, leaving any other VMA mapping the folio pointing a huge PMD at an order-0 page.
The latter is memory corruption, previously masked by the former.
The DRM side had its own problems in the same fallback: there was no order-0 fallback at all despite a TODO saying one was needed, the error path computed folio_order() after put_page(), and once the destination is demoted to order-0 the source page array has to be populated per page rather than per folio head, or the copy stops after one page.
Validation was performed using xe_exec_system_allocator. The issue was initially discovered on systems configured with an artificially constrained memory footprint (mem=8G), where failures occurred intermittently. Error injection was then introduced to reliably reproduce the failure condition, enabling thorough validation of the fix. Results were confirmed through pass/fail A/B testing.
Matt
v2::
- Add assert in 'Fix folio allocation fallback and use-after-put' for THP placement invariant which Sashiko hallucinated as a bug [1]
- Add 'Clear MIGRATE_PFN_MIGRATE on all sub-folios of a split THP' (Sashiko)
- Fix checkpatch issues (CI)
- Swap cache issue flagged by Sashiko [1] not fixed as this code doesn't appear reachable (i.e., dead code). Can address in a follow up if needed
v3:
- Noticed Arvind's patch [2] fixes some of core issues attempting to be fixed to in v1, v2. Verified Arvind's patch works as expected and including it in this rev for Intel's CI which is based on drm-tip and does not have Arvind's patch. Dropping unnecessary fixes from v1, v2 as a result.
- Include 'mm/migrate_device: Do not write past the end of the src_pfns array' unrelated fix flagged by Sashiko in v2
- Include 'dma-unmap pages before handling migration errors' unreleated fix flagged by Sashiko in v2
[1] https://sashiko.dev/#/patchset/20260805113338.3742178-1-matthew.brost%40intel.com
[2] https://patchew.org/linux/[email protected]/
Arvind Yadav (1):
mm/migrate_device: Clear stale mapping after freeing swapcache
Matthew Brost (5):
mm/migrate_device: Do not write past the end of the src_pfns array mm/migrate_device: Fix THP splitting of a CPU faulted device private
folio
drm/pagemap: dma-unmap pages before handling migration errors drm/pagemap: Fix folio allocation fallback and use-after-put drm/pagemap: Add fault injection for higher-order RAM folio allocation
drivers/gpu/drm/drm_pagemap.c | 176 +++++++++++++++++++++++++++------- mm/migrate_device.c | 115 +++++++++++++++++++--- 2 files changed, 248 insertions(+), 43 deletions(-)
Signature · 1 line
2.34.1
Matthew Brost
maintainerPATCH v3 1/6 mm/migrate_device: Clear stale mapping after freeing swapcache
From: Arvind Yadav <[email protected]>
__migrate_device_pages() reads the folio mapping before calling folio_free_swap(). When folio_free_swap() succeeds, the folio is removed from the swap cache, but the saved mapping still points to swap_space.
Passing the stale mapping to folio_migrate_mapping() makes it use the mapped-folio path for a folio that is no longer in swapcache. It can then operate on swap_space.i_pages with invalid reference accounting, eventually triggering a folio reference count BUG.
After a successful split, nr still contains the number of pages in the original large folio, although each resulting page is now a separate order-0 folio. Reset nr to 1 so each split folio is processed separately, including its own swapcache removal and mapping lookup.
Refresh the saved mapping after folio_free_swap() so the current folio state is used during migration.
v2:
- Refresh the mapping using folio_mapping(), as suggested by Zi Yan.
v3:
- Reset nr to 1 after a successful split so each resulting folio is processed independently, as suggested by Zi Yan.
v4:
- Re-read each source folio's mapping immediately before folio_migrate_mapping(), as suggested by Balbir Singh.
- Add a warning to validate the post-split order-0 invariant, as suggested by Balbir Singh.
--- mm/migrate_device.c | 13 +++++++++++++ 1 file changed, 13 insertions(+)
mm/migrate_device.c +13 -0
@@ -1183,6 +1183,13 @@ static void __migrate_device_pages(unsigned long *src_pfns, MIGRATE_PFN_COMPOUND); goto next; } + +/* +* reset nr so that only first after-split folio +* is processed below +*/ +VM_WARN_ON_ONCE (folio_test_large (folio)); + nr =1 ; }else if ((src_pfns[i] &MIGRATE_PFN_MIGRATE ) && (dst_pfns[i] &MIGRATE_PFN_COMPOUND ) && !(src_pfns[i] &MIGRATE_PFN_COMPOUND )) {
@@ -1222,6 +1229,12 @@ static void __migrate_device_pages(unsigned long *src_pfns, folio =page_folio (migrate_pfn_to_page (src_pfns[i+j])); newfolio =page_folio (migrate_pfn_to_page (dst_pfns[i+j])); +/* +* folio_free_swap() removed the folio from the swap +* cache. Refresh the saved mapping before migration. +*/ + mapping =folio_mapping (folio); + r =folio_migrate_mapping (mapping, newfolio, folio, extra_cnt);if (r) src_pfns[i+j] &= ~MIGRATE_PFN_MIGRATE ;
Signature · 1 line
2.34.1
[email protected]
AI reviewRe: [PATCH v3 1/6] mm/migrate_device: Clear stale mapping after freeing swapcache
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
Pre-existing issues:
- [High] Missing goto next; causes aborted migration to corrupt page cache and page tables. --
--- Patch [1]: [PATCH v3 1/6] mm/migrate_device: Clear stale mapping after freeing swapcache --- commit 36bc19904d5fb8100fc812248c9247ad225d6ebe
Author: Arvind Yadav <[email protected]>
mm/migrate_device: Clear stale mapping after freeing swapcache
This commit fixes a bug in __migrate_device_pages() where a stale mapping is used after a folio is removed from the swap cache. It refreshes the mapping via folio_mapping() and resets 'nr' to 1 after a successful folio split to process the resulting order-0 folios independently.
Quoted 17 lines
mm/migrate_device.c +7
-0@@ -1193,6 +1193,13 @@ static void __migrate_device_pages(unsigned long *src_pfns, MIGRATE_PFN_COMPOUND); goto next; } + +/* +* reset nr so that only first after-split folio +* is processed below +*/ +VM_WARN_ON_ONCE (folio_test_large (folio)); + nr =1 ; }else if ((src_pfns[i] &MIGRATE_PFN_MIGRATE ) && (dst_pfns[i] &MIGRATE_PFN_COMPOUND ) && !(src_pfns[i] &MIGRATE_PFN_COMPOUND )) {
Quoted 1 line
src_pfns[i] &= ~MIGRATE_PFN_MIGRATE;
[Severity: High]
This is a pre-existing issue, but does this error path in __migrate_device_pages() miss a goto next statement?
When a non-compound source page is paired with a compound destination page, the code correctly clears the MIGRATE_PFN_MIGRATE flag to abort the migration, but it falls through instead of skipping to the next iteration.
Without a goto next, execution continues to the unconditional page cache migration loop at the bottom of the function. This calls folio_migrate_mapping(), which moves the page cache state to the new folio.
Later, because MIGRATE_PFN_MIGRATE was cleared, migrate_vma_finalize() will restore the CPU page tables to map the old source page. Will this cause data corruption by desynchronizing the CPU page tables from the page cache?
Quoted 2 lines
mm/migrate_device.c +0
-0} }
Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=1
Matthew Brost
maintainerPATCH v3 2/6 mm/migrate_device: Do not write past the end of the src_pfns array
In reply to Matthew Brostmigrate_device_range() and migrate_device_pfns() zero the tail entries of a large folio without checking them against @npages:
for (j = 1; j < nr; j++) src_pfns[i+j] = 0;
@nr comes from the folio, not from the array, so a folio that extends past the end of the range being migrated writes beyond src_pfns[]. Callers size that array for @npages entries, so this corrupts whatever follows it.
Bound the loop by @npages. The subsequent "i += j - 1" still terminates the outer loop correctly: on a bounded exit j is @npages - i, leaving i at @npages after the increment.
--- mm/migrate_device.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
mm/migrate_device.c +2 -2
@@ -1415,7 +1415,7 @@ int migrate_device_range(unsigned long *src_pfns, unsigned long start, nr =folio_nr_pages (folio);if (nr >1 ) { src_pfns[i] |=MIGRATE_PFN_COMPOUND ; -for (j =1 ; j < nr; j++) +for (j =1 ; j < nr && (i + j) < npages; j++) src_pfns[i+j] =0 ; i += j -1 ; pfn += j -1 ;
@@ -1449,7 +1449,7 @@ int migrate_device_pfns(unsigned long *src_pfns, unsigned long npages) nr =folio_nr_pages (folio);if (nr >1 ) { src_pfns[i] |=MIGRATE_PFN_COMPOUND ; -for (j =1 ; j < nr; j++) +for (j =1 ; j < nr && (i + j) < npages; j++) src_pfns[i+j] =0 ; i += j -1 ; }
Signature · 1 line
2.34.1
[email protected]
AI reviewRe: [PATCH v3 2/6] mm/migrate_device: Do not write past the end of the src_pfns array
Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
Pre-existing issues:
- [High] Unsafe speculative read of folio_nr_pages(folio) without lock success check leads to array corruption and PFN iterator overshoot.
- [High] migrate_device_pfns() corrupts non-contiguous caller arrays by indiscriminately zeroing elements when encountering a compound page. --
--- Patch [2]: [PATCH v3 2/6] mm/migrate_device: Do not write past the end of the src_pfns array --- commit f29e7afad950b0af66d7edea5f1c3b8203675195
Author: Matthew Brost <[email protected]>
mm/migrate_device: Do not write past the end of the src_pfns array
migrate_device_range() and migrate_device_pfns() zero the tail entries of a large folio without checking them against @npages. This commit bounds the loop by @npages to prevent corrupting whatever follows the array.
Quoted 5 lines
mm/migrate_device.c +0
-0@@ -1425,7 +1425,7 @@ int migrate_device_range(unsigned long *src_pfns, unsigned long start,
[ ... ]
mm/migrate_device.c int migrate_device_range(unsigned long *src_pfns, unsigned long start, · line 1416
Quoted 3 lines
mm/migrate_device.c +0
-0src_pfns[i] =migrate_device_pfn_lock (pfn); nr =folio_nr_pages (folio);if (nr >1 ) {
[Severity: High]
This isn't a bug introduced by this patch, but does this code speculatively read the folio size even if the lock fails?
If migrate_device_pfn_lock() fails (e.g., due to a concurrent free or split), folio_nr_pages(folio) accesses unstable memory, yielding a garbage nr. This can cause unbounded iterator advancement and arbitrary zeroing of src_pfns.
Additionally, if the PFN is a tail page, the lock correctly fails, but folio_nr_pages() reads the head page's size and advances pfn += nr - 1, overshooting the end of the folio and silently skipping unrelated PFNs in the migration range.
Should there be a check to ensure src_pfns[i] indicates a successful lock before reading the folio size?
Quoted 7 lines
mm/migrate_device.c +1
-1src_pfns[i] |=MIGRATE_PFN_COMPOUND ; -for (j =1 ; j < nr; j++) +for (j =1 ; j < nr && (i + j) < npages; j++) src_pfns[i+j] =0 ; i += j -1 ; pfn += j -1 ;@@ -1459,7 +1459,7 @@ int migrate_device_pfns(unsigned long *src_pfns, unsigned long npages)
[ ... ]
mm/migrate_device.c int migrate_device_range(unsigned long *src_pfns, unsigned long start, · line 1416
Quoted 3 lines
mm/migrate_device.c +0
-0src_pfns[i] =migrate_device_pfn_lock (src_pfns[i]); nr =folio_nr_pages (folio);if (nr >1 ) {
[Severity: High]
This is also a pre-existing issue, but is it safe to read the folio size here without confirming that migrate_device_pfn_lock() succeeded, similar to the issue in migrate_device_range() above?
mm/migrate_device.c int migrate_device_range(unsigned long *src_pfns, unsigned long start, · line 1419
Quoted 4 lines
mm/migrate_device.c +1
-1src_pfns[i] |=MIGRATE_PFN_COMPOUND ; -for (j =1 ; j < nr; j++) +for (j =1 ; j < nr && (i + j) < npages; j++) src_pfns[i+j] =0 ;
[Severity: High]
This is a pre-existing issue, but does this zeroing logic break support for non-contiguous PFN arrays?
migrate_device_pfns() documents that it supports non-contiguous pre-populated arrays of device pages to migrate. However, when it encounters a compound page, it reuses the large-folio iteration logic and zeroes out the next nr - 1 elements.
In a non-contiguous array, these subsequent elements are independent, unrelated PFNs provided by the caller, which would be overwritten and excluded from migration.
Quoted 2 lines
mm/migrate_device.c +0
-0i += j -1 ; }
Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=2
Re: [PATCH v3 2/6] mm/migrate_device: Do not write past the end of the src_pfns array
In reply to Matthew BrostQuoted 58 lines · Matthew Brost
migrate_device_range()andmigrate_device_pfns()zero the tail entries of a large folio without checking them against @npages:for (j = 1; j < nr; j++) src_pfns[i+j] = 0;@nr comes from the folio, not from the array, so a folio that extends past the end of the range being migrated writes beyond src_pfns[]. Callers size that array for @npages entries, so this corrupts whatever follows it.
Bound the loop by @npages. The subsequent "i += j - 1" still terminates the outer loop correctly: on a bounded exit j is @npages - i, leaving i at @npages after the increment.
Reported-by Sashiko <[email protected]>Fixes a30b48bf1b24 ("mm/migrate_device: implement THP migration of zone device pages")Cc Andrew Morton <[email protected]>Cc David Hildenbrand <[email protected]>Cc Lorenzo Stoakes <[email protected]>Cc Zi Yan <[email protected]>Cc Baolin Wang <[email protected]>Cc Liam R. Howlett <[email protected]>Cc Nico Pache <[email protected]>Cc Ryan Roberts <[email protected]>Cc Dev Jain <[email protected]>Cc Barry Song <[email protected]>Cc Lance Yang <[email protected]>Cc Usama Arif <[email protected]>Cc Joshua Hahn <[email protected]>Cc Rakie Kim <[email protected]>Cc Byungchul Park <[email protected]>Cc Gregory Price <[email protected]>Cc Ying Huang <[email protected]>Cc Alistair Popple <[email protected]>Cc Balbir Singh <[email protected]>Cc Maarten Lankhorst <[email protected]>Cc Maxime Ripard <[email protected]>Cc Thomas Zimmermann <[email protected]>Cc David Airlie <[email protected]>Cc Simona Vetter <[email protected]>Cc Thomas Hellström <[email protected]>Cc Francois Dugast <[email protected]>Assisted-by GitHub_Copilot:claude-opus-5Signed-off-by Matthew Brost <[email protected]>--- mm/migrate_device.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)mm/migrate_device.c +0
-0
mm/migrate_device.c int migrate_device_range(unsigned long *src_pfns, unsigned long start, · line 1419
Quoted 6 lines
mm/migrate_device.c +1
-1@@ -1415,7 +1415,7 @@ int migrate_device_range(unsigned long *src_pfns, unsigned long start, nr =folio_nr_pages (folio);if (nr >1 ) { src_pfns[i] |=MIGRATE_PFN_COMPOUND ; -for (j =1 ; j < nr; j++) +for (j =1 ; j < nr && (i + j) < npages; j++) src_pfns[i+j] =0 ;
I have a similar patch lined up in my clean ups (that I am yet to send out), but the patch was more along the lines of
nr = folio_nr_pages(folio);
+ if (nr > npages - i) {
+ migrate_device_folio_unlock(folio);
+ src_pfns[i] = 0;
+ continue;
+ }
+
This prevents partial selection, migrate_device_unmap() does take npages as an argument. We could change the increment of i here to skip past the entire folio.
I am OK with this change as well
mm/migrate_device.c int migrate_device_pfns(unsigned long *src_pfns, unsigned long npages) · line 1455
Quoted 11 lines
mm/migrate_device.c +1
-1i += j -1 ; pfn += j -1 ;@@ -1449,7 +1449,7 @@ int migrate_device_pfns(unsigned long *src_pfns, unsigned long npages) nr =folio_nr_pages (folio);if (nr >1 ) { src_pfns[i] |=MIGRATE_PFN_COMPOUND ; -for (j =1 ; j < nr; j++) +for (j =1 ; j < nr && (i + j) < npages; j++) src_pfns[i+j] =0 ; i += j -1 ; }
David Hildenbrand (Arm)
maintainerRe: [PATCH v3 2/6] mm/migrate_device: Do not write past the end of the src_pfns array
In reply to Matthew BrostQuoted 67 lines · Matthew Brost
migrate_device_range()andmigrate_device_pfns()zero the tail entries of a large folio without checking them against @npages:for (j = 1; j < nr; j++) src_pfns[i+j] = 0;@nr comes from the folio, not from the array, so a folio that extends past the end of the range being migrated writes beyond src_pfns[]. Callers size that array for @npages entries, so this corrupts whatever follows it.
Bound the loop by @npages. The subsequent "i += j - 1" still terminates the outer loop correctly: on a bounded exit j is @npages - i, leaving i at @npages after the increment.
Reported-by Sashiko <[email protected]>Fixes a30b48bf1b24 ("mm/migrate_device: implement THP migration of zone device pages")Cc Andrew Morton <[email protected]>Cc David Hildenbrand <[email protected]>Cc Lorenzo Stoakes <[email protected]>Cc Zi Yan <[email protected]>Cc Baolin Wang <[email protected]>Cc Liam R. Howlett <[email protected]>Cc Nico Pache <[email protected]>Cc Ryan Roberts <[email protected]>Cc Dev Jain <[email protected]>Cc Barry Song <[email protected]>Cc Lance Yang <[email protected]>Cc Usama Arif <[email protected]>Cc Joshua Hahn <[email protected]>Cc Rakie Kim <[email protected]>Cc Byungchul Park <[email protected]>Cc Gregory Price <[email protected]>Cc Ying Huang <[email protected]>Cc Alistair Popple <[email protected]>Cc Balbir Singh <[email protected]>Cc Maarten Lankhorst <[email protected]>Cc Maxime Ripard <[email protected]>Cc Thomas Zimmermann <[email protected]>Cc David Airlie <[email protected]>Cc Simona Vetter <[email protected]>Cc Thomas Hellström <[email protected]>Cc Francois Dugast <[email protected]>Assisted-by GitHub_Copilot:claude-opus-5Signed-off-by Matthew Brost <[email protected]>--- mm/migrate_device.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)mm/migrate_device.c +1
-1@@ -1415,7 +1415,7 @@ int migrate_device_range(unsigned long *src_pfns, unsigned long start, nr =folio_nr_pages (folio);if (nr >1 ) { src_pfns[i] |=MIGRATE_PFN_COMPOUND ; -for (j =1 ; j < nr; j++) +for (j =1 ; j < nr && (i + j) < npages; j++) src_pfns[i+j] =0 ; i += j -1 ; pfn += j -1 ;
mm/migrate_device.c int migrate_device_pfns(unsigned long *src_pfns, unsigned long npages) · line 1455
Quoted 8 lines
mm/migrate_device.c +1
-1@@ -1449,7 +1449,7 @@ int migrate_device_pfns(unsigned long *src_pfns, unsigned long npages) nr =folio_nr_pages (folio);if (nr >1 ) { src_pfns[i] |=MIGRATE_PFN_COMPOUND ; -for (j =1 ; j < nr; j++) +for (j =1 ; j < nr && (i + j) < npages; j++) src_pfns[i+j] =0 ; i += j -1 ; }
What's the status of this? I assume this is fixed by
https://lore.kernel.org/[email protected]
instead?
What is the right direction?
Signature · 3 lines
Cheers, David
Matthew Brost
maintainerRe: [PATCH v3 2/6] mm/migrate_device: Do not write past the end of the src_pfns array
Quoted 70 lines · David Hildenbrand (Arm)
Quoted 69 lines · Matthew Brost
migrate_device_range()andmigrate_device_pfns()zero the tail entries of a large folio without checking them against @npages:for (j = 1; j < nr; j++) src_pfns[i+j] = 0;@nr comes from the folio, not from the array, so a folio that extends past the end of the range being migrated writes beyond src_pfns[]. Callers size that array for @npages entries, so this corrupts whatever follows it.
Bound the loop by @npages. The subsequent "i += j - 1" still terminates the outer loop correctly: on a bounded exit j is @npages - i, leaving i at @npages after the increment.
Reported-by Sashiko <[email protected]>Fixes a30b48bf1b24 ("mm/migrate_device: implement THP migration of zone device pages")Cc Andrew Morton <[email protected]>Cc David Hildenbrand <[email protected]>Cc Lorenzo Stoakes <[email protected]>Cc Zi Yan <[email protected]>Cc Baolin Wang <[email protected]>Cc Liam R. Howlett <[email protected]>Cc Nico Pache <[email protected]>Cc Ryan Roberts <[email protected]>Cc Dev Jain <[email protected]>Cc Barry Song <[email protected]>Cc Lance Yang <[email protected]>Cc Usama Arif <[email protected]>Cc Joshua Hahn <[email protected]>Cc Rakie Kim <[email protected]>Cc Byungchul Park <[email protected]>Cc Gregory Price <[email protected]>Cc Ying Huang <[email protected]>Cc Alistair Popple <[email protected]>Cc Balbir Singh <[email protected]>Cc Maarten Lankhorst <[email protected]>Cc Maxime Ripard <[email protected]>Cc Thomas Zimmermann <[email protected]>Cc David Airlie <[email protected]>Cc Simona Vetter <[email protected]>Cc Thomas Hellström <[email protected]>Cc Francois Dugast <[email protected]>Assisted-by GitHub_Copilot:claude-opus-5Signed-off-by Matthew Brost <[email protected]>--- mm/migrate_device.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)mm/migrate_device.c +1
-1@@ -1415,7 +1415,7 @@ int migrate_device_range(unsigned long *src_pfns, unsigned long start, nr =folio_nr_pages (folio);if (nr >1 ) { src_pfns[i] |=MIGRATE_PFN_COMPOUND ; -for (j =1 ; j < nr; j++) +for (j =1 ; j < nr && (i + j) < npages; j++) src_pfns[i+j] =0 ; i += j -1 ; pfn += j -1 ;@@ -1449,7 +1449,7 @@ int migrate_device_pfns(unsigned long *src_pfns, unsigned long npages) nr =folio_nr_pages (folio);if (nr >1 ) {
Quoted 9 lines
mm/migrate_device.c int migrate_device_pfns(unsigned long *src_pfns, unsigned long npages) · line 1455
Quoted 6 lines
mm/migrate_device.c +1
-1src_pfns[i] |=MIGRATE_PFN_COMPOUND ; -for (j =1 ; j < nr; j++) +for (j =1 ; j < nr && (i + j) < npages; j++) src_pfns[i+j] =0 ; i += j -1 ; }What's the status of this? I assume this is fixed by
I don't think Andrew has pulled either of core MM patches in this series, so we can discuss a bit more.
Quoted 1 line
https://lore.kernel.org/[email protected]
I think this version plus your suggestion is probably better here - we likely shouldn't hand back compound pfns which don't overflow the requested number of pages. Let' continue the discussion there I guess.
Matt
Quoted 9 lines
instead?
What is the right direction?
Signature · 3 lines
Cheers, David
Matthew Brost
maintainerPATCH v3 3/6 mm/migrate_device: Fix THP splitting of a CPU faulted device private folio
In reply to Matthew BrostWhen a CPU faults on a device private PMD and the device driver can only allocate order-0 destination folios, __migrate_device_pages() has to split the source THP via migrate_vma_split_unmapped_folio(). That path is broken in two independent ways when the fault is what triggered the migration.
First, the split never succeeds. At the point folio_split_unmapped() is called the folio carries two references beyond the ones it is entitled to:
1 - taken by do_huge_pmd_device_private() for the duration of the
->migrate_to_ram() callback
2 - taken by migrate_vma_collect_huge_pmd() when the folio was
collected
(the mapping reference having been dropped by set_pmd_migration_entry()).
folio_split_unmapped() requires folio_expected_ref_count(folio) == folio_ref_count(folio) - 1, i.e. it tolerates exactly one caller reference. With both of the above held the check sees 2 against an expected 0 and returns -EAGAIN, so the migration is abandoned and the CPU fault makes no progress.
The PTE-based split path does not have this problem:migrate_vma_split_folio() is called before any collect reference is taken and explicitly skips folio_get() for the fault folio, so the fault reference is the single caller reference the split expects.
Fix it by dropping the fault reference across the split and re-taking it afterwards. do_huge_pmd_device_private() derives the fault page from the PMD entry, so it is always the head page of the folio and always ends up in the head folio of an uniform split to order 0; re-taking the reference on the folio therefore puts it back exactly where do_huge_pmd_device_private() will release it. The folio cannot be freed while the reference is dropped because the collect reference is still held.
Second, the folio is split globally but the page tables were demoted only locally:
split_huge_pmd_address(migrate->vma, addr, true); ret = folio_split_unmapped(folio, 0);
migrate_device_unmap() unmaps via try_to_migrate(folio, 0), deliberately without TTU_SPLIT_HUGE_PMD, so every VMA that PMD maps the folio is left holding a PMD sized migration entry. A folio that was PMD mapped in more than one VMA -- after fork(), for example -- therefore keeps huge migration entries in all the other VMAs while only migrate->vma is demoted.
folio_split_unmapped() does not notice: the folio is fully unmapped, so it only looks at the refcount and happily splits to order 0. The other VMAs are then left pointing a huge PMD at an order-0 folio, and migrate_vma_finalize() -> remove_migration_ptes() walks into it:
page dumped because: VM_BUG_ON_FOLIO(folio_test_hugetlb(folio) ||
!folio_test_pmd_mappable(folio))
kernel BUG at mm/migrate.c:368!
RIP: 0010:remove_migration_pte+0x56a/0x9b0
Call Trace:
rmap_walk_anon+0xfc/0x260
remove_migration_ptes+0x79/0xb0
__migrate_device_finalize+0x113/0x290
__drm_pagemap_migrate_to_ram+0x278/0x360 [drm_gpusvm_helper]
drm_pagemap_migrate_to_ram+0x5c/0x80 [drm_gpusvm_helper]
do_huge_pmd_device_private+0x160/0x280Without CONFIG_DEBUG_VM the VM_BUG_ON_FOLIO() is compiled out and remove_migration_pmd() installs a huge PMD pointing at an order-0 page instead, along with add_mm_counter(mm, MM_ANONPAGES, HPAGE_PMD_NR). The victim mm then maps 2MB of address space onto a single 4K page, which shows up later as bad rss-counter state, leaked page tables and page allocator freelist corruption in unrelated processes.
Note this second problem was latent before the refcount fix above: the split always failed, and the failed attempt left migrate->vma demoted, so the retried fault took the PTE path, where __folio_split() unmaps with TTU_SPLIT_HUGE_PMD and demotes every VMA.
Fix it by walking the rmap and demoting every PMD sized migration entry mapping the folio before splitting it. Demote with freeze = false: entry creation in __split_huge_pmd_locked() is dispatched on pmd_is_migration_entry(), not on freeze, so a migration PMD becomes PTE sized migration entries either way, and freeze only controls a trailing put_page(). With freeze = false there is no refcount change at all, which makes the demotion idempotent across N VMAs.
rmap_walk_control.anon_lock is deliberately left unset:folio_lock_anon_vma_read() depends on folio_mapped(), and the folio is already fully unmapped here. This mirrors remove_migration_ptes().
Finally, refuse the split for a folio that is not anonymous. The rmap walk would otherwise reach a file backed VMA, where split_huge_pmd_address() zaps the PMD instead of demoting it.
--- mm/migrate_device.c | 98 ++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 89 insertions(+), 9 deletions(-)
mm/migrate_device.c +89 -9
@@ -899,22 +899,104 @@ static int migrate_vma_insert_huge_pmd_page(struct migrate_vma *migrate,return 0 ; } +static bool migrate_vma_split_pmd_one (struct folio *folio, +struct vm_area_struct *vma, +unsigned long addr,void *arg) +{ +DEFINE_FOLIO_VMA_WALK (pvmw, folio, vma, addr,PVMW_SYNC |PVMW_MIGRATION ); + +while (page_vma_mapped_walk (&pvmw)) { +if (pvmw.pte) +continue ; + + addr = pvmw.address; +page_vma_mapped_walk_done (&pvmw); + +/* +* Demote with freeze = false: the PMD already holds a +* migration entry, so __split_huge_pmd_locked() creates PTE +* sized migration entries from it and leaves the refcount +* alone. There is at most one PMD mapping @folio per VMA, so +* stop the walk here. +*/ +split_huge_pmd_address (vma, addr, false); +break ; + } + +return true; +} + +/* +* Demote every PMD sized migration entry that maps @folio to PTE sized ones. +* +* migrate_device_unmap() unmaps with try_to_migrate(folio, 0), i.e. without +* TTU_SPLIT_HUGE_PMD, so a folio that was PMD mapped in several VMAs -- after +* fork(), for instance -- ends up with a PMD sized migration entry in every one +* of them. folio_split_unmapped() below does not care, it only looks at the +* refcount, so splitting the folio without demoting all of those first would +* leave the other VMAs pointing a huge PMD at what is now an order-0 folio. +* remove_migration_ptes() trips over that in migrate_vma_finalize(). +*/ +static void migrate_vma_split_pmd_mappings (struct folio *folio) +{ +struct rmap_walk_control rwc = { + .rmap_one = migrate_vma_split_pmd_one, + }; + +/* +* Do not pass .anon_lock: folio_lock_anon_vma_read() requires +* folio_mapped(), and @folio is already fully unmapped here. +*/ +rmap_walk (folio, &rwc); +} +static int migrate_vma_split_unmapped_folio (struct migrate_vma *migrate, -unsigned long idx,unsigned long addr, +unsigned long idx,struct folio *folio) {unsigned long i;unsigned long pfn;unsigned long flags; +bool fault_folio;int ret =0 ;/* -* take a reference, since split_huge_pmd_address() with freeze = true -* drops a reference at the end. +* migrate_vma_split_pmd_mappings() walks the rmap, and +* split_huge_pmd_address() zaps rather than demotes a PMD in a VMA that +* is not anonymous. migrate_vma_collect_huge_pmd() does not check the +* VMA type, so a file THP can reach here; the rest of the migrate_vma() +* machinery only supports anonymous memory anyway. */ -folio_get (folio); -split_huge_pmd_address (migrate->vma, addr, true); +if (!folio_test_anon (folio)) +return -EINVAL ; + +/* +* A CPU fault on a device private PMD holds an extra reference on the +* folio, taken by do_huge_pmd_device_private(). folio_split_unmapped() +* only tolerates a single caller reference, so the split would always +* fail with -EAGAIN while this fault reference is held. +* +* do_huge_pmd_device_private() derives the fault page from the PMD +* entry, so it is always the head page of @folio, and therefore always +* ends up in the head folio after an uniform split to order 0. Drop +* the reference across the split and re-take it on the head folio +* afterwards, leaving the reference exactly where it is expected to be +* released. +* +* The folio cannot go away while the reference is dropped: the +* reference taken by migrate_vma_collect_huge_pmd() is still held. +*/ + fault_folio = migrate->fault_page && +page_folio (migrate->fault_page) == folio; + +migrate_vma_split_pmd_mappings (folio); + +if (fault_folio) +folio_put (folio); ret =folio_split_unmapped (folio,0 ); +if (fault_folio) +folio_get (folio); +if (ret)return ret; migrate->src[idx] &= ~MIGRATE_PFN_COMPOUND ;
@@ -935,7 +1017,7 @@ static int migrate_vma_insert_huge_pmd_page(struct migrate_vma *migrate, }static int migrate_vma_split_unmapped_folio (struct migrate_vma *migrate, -unsigned long idx,unsigned long addr, +unsigned long idx,struct folio *folio) {return 0 ;
@@ -1103,7 +1185,6 @@ static void __migrate_device_pages(unsigned long *src_pfns,struct mmu_notifier_range range;unsigned long i, j;bool notified = false; -unsigned long addr;for (i =0 ; i < npages; ) {struct page *newpage =migrate_pfn_to_page (dst_pfns[i]);
@@ -1177,8 +1258,7 @@ static void __migrate_device_pages(unsigned long *src_pfns, goto next; } nr =1 <<folio_order (folio); - addr = migrate->start + i *PAGE_SIZE ; -if (migrate_vma_split_unmapped_folio (migrate, i, addr, folio)) { +if (migrate_vma_split_unmapped_folio (migrate, i, folio)) { src_pfns[i] &= ~(MIGRATE_PFN_MIGRATE |MIGRATE_PFN_COMPOUND ); goto next;
Signature · 1 line
2.34.1
Re: [PATCH v3 3/6] mm/migrate_device: Fix THP splitting of a CPU faulted device private folio
Quoted 74 lines · Matthew Brost
When a CPU faults on a device private PMD and the device driver can only allocate order-0 destination folios,
__migrate_device_pages()has to split the source THP viamigrate_vma_split_unmapped_folio(). That path is broken in two independent ways when the fault is what triggered the migration.First, the split never succeeds. At the point
folio_split_unmapped()is called the folio carries two references beyond the ones it is entitled to:1 - taken by
do_huge_pmd_device_private()for the duration of the->migrate_to_ram() callback2 - taken by
migrate_vma_collect_huge_pmd()when the folio was
collected(the mapping reference having been dropped by
set_pmd_migration_entry()).
folio_split_unmapped()requiresfolio_expected_ref_count(folio)==folio_ref_count(folio)- 1, i.e. it tolerates exactly one caller reference. With both of the above held the check sees 2 against an expected 0 and returns-EAGAIN, so the migration is abandoned and the CPU fault makes no progress.The PTE-based split path does not have this problem:
migrate_vma_split_folio()is called before any collect reference is taken and explicitly skipsfolio_get()for the fault folio, so the fault reference is the single caller reference the split expects.Fix it by dropping the fault reference across the split and re-taking it afterwards.
do_huge_pmd_device_private()derives the fault page from the PMD entry, so it is always the head page of the folio and always ends up in the head folio of an uniform split to order 0; re-taking the reference on the folio therefore puts it back exactly wheredo_huge_pmd_device_private()will release it. The folio cannot be freed while the reference is dropped because the collect reference is still held.Second, the folio is split globally but the page tables were demoted only locally:
split_huge_pmd_address(migrate->vma, addr, true); ret = folio_split_unmapped(folio, 0);
migrate_device_unmap()unmaps viatry_to_migrate(folio, 0), deliberately withoutTTU_SPLIT_HUGE_PMD, so every VMA that PMD maps the folio is left holding a PMD sized migration entry. A folio that was PMD mapped in more than one VMA -- afterfork(), for example -- therefore keeps huge migration entries in all the other VMAs while onlymigrate->vmais demoted.
folio_split_unmapped()does not notice: the folio is fully unmapped, so it only looks at the refcount and happily splits to order 0. The other VMAs are then left pointing a huge PMD at an order-0 folio, andmigrate_vma_finalize()->remove_migration_ptes()walks into it:page dumped because: VM_BUG_ON_FOLIO(folio_test_hugetlb(folio) || !folio_test_pmd_mappable(folio)) kernel BUG at mm/migrate.c:368! RIP: 0010:remove_migration_pte+0x56a/0x9b0 Call Trace: rmap_walk_anon+0xfc/0x260 remove_migration_ptes+0x79/0xb0 __migrate_device_finalize+0x113/0x290 __drm_pagemap_migrate_to_ram+0x278/0x360 [drm_gpusvm_helper] drm_pagemap_migrate_to_ram+0x5c/0x80 [drm_gpusvm_helper] do_huge_pmd_device_private+0x160/0x280Without
CONFIG_DEBUG_VMtheVM_BUG_ON_FOLIO()is compiled out andremove_migration_pmd()installs a huge PMD pointing at an order-0 page instead, along withadd_mm_counter(mm, MM_ANONPAGES, HPAGE_PMD_NR). The victim mm then maps 2MB of address space onto a single 4K page, which shows up later as bad rss-counter state, leaked page tables and page allocator freelist corruption in unrelated processes.
Quoted 5 lines
Note this second problem was latent before the refcount fix above: the split always failed, and the failed attempt left
migrate->vmademoted, so the retried fault took the PTE path, where__folio_split()unmaps withTTU_SPLIT_HUGE_PMDand demotes every VMA.
The refcount fix to enable migration of PMD's in fault context. IOW, if we need PMD migration in the context of a CPU fault, then the proposed patch is the right fix, otherwise we split and migrate and that has no crashes/impact?
Quoted 185 lines
Fix it by walking the rmap and demoting every PMD sized migration entry mapping the folio before splitting it. Demote with freeze = false: entry creation in
__split_huge_pmd_locked()is dispatched onpmd_is_migration_entry(), not on freeze, so a migration PMD becomes PTE sized migration entries either way, and freeze only controls a trailingput_page(). With freeze = false there is no refcount change at all, which makes the demotion idempotent across N VMAs.rmap_walk_control.anon_lock is deliberately left unset:
folio_lock_anon_vma_read()depends onfolio_mapped(), and the folio is already fully unmapped here. This mirrorsremove_migration_ptes().Finally, refuse the split for a folio that is not anonymous. The rmap walk would otherwise reach a file backed VMA, where
split_huge_pmd_address()zaps the PMD instead of demoting it.Fixes 4265d67e405a ("mm/migrate_device: add THP splitting during migration")Cc Andrew Morton <[email protected]>Cc David Hildenbrand <[email protected]>Cc Lorenzo Stoakes <[email protected]>Cc Zi Yan <[email protected]>Cc Baolin Wang <[email protected]>Cc Liam R. Howlett <[email protected]>Cc Nico Pache <[email protected]>Cc Ryan Roberts <[email protected]>Cc Dev Jain <[email protected]>Cc Barry Song <[email protected]>Cc Lance Yang <[email protected]>Cc Usama Arif <[email protected]>Cc Joshua Hahn <[email protected]>Cc Rakie Kim <[email protected]>Cc Byungchul Park <[email protected]>Cc Gregory Price <[email protected]>Cc Ying Huang <[email protected]>Cc Alistair Popple <[email protected]>Cc Balbir Singh <[email protected]>Cc Maarten Lankhorst <[email protected]>Cc Maxime Ripard <[email protected]>Cc Thomas Zimmermann <[email protected]>Cc David Airlie <[email protected]>Cc Simona Vetter <[email protected]>Cc Thomas Hellström <[email protected]>Cc Francois Dugast <[email protected]>Assisted-by GitHub_Copilot:claude-opus-5Signed-off-by Matthew Brost <[email protected]>--- mm/migrate_device.c | 98 ++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 89 insertions(+), 9 deletions(-)mm/migrate_device.c +88
-7@@ -899,22 +899,104 @@ static int migrate_vma_insert_huge_pmd_page(struct migrate_vma *migrate,return 0 ; } +static bool migrate_vma_split_pmd_one (struct folio *folio, +struct vm_area_struct *vma, +unsigned long addr,void *arg) +{ +DEFINE_FOLIO_VMA_WALK (pvmw, folio, vma, addr,PVMW_SYNC |PVMW_MIGRATION ); + +while (page_vma_mapped_walk (&pvmw)) { +if (pvmw.pte) +continue ; + + addr = pvmw.address; +page_vma_mapped_walk_done (&pvmw); + +/* +* Demote with freeze = false: the PMD already holds a +* migration entry, so __split_huge_pmd_locked() creates PTE +* sized migration entries from it and leaves the refcount +* alone. There is at most one PMD mapping @folio per VMA, so +* stop the walk here. +*/ +split_huge_pmd_address (vma, addr, false); +break ; + } + +return true; +} + +/* +* Demote every PMD sized migration entry that maps @folio to PTE sized ones. +* +* migrate_device_unmap() unmaps with try_to_migrate(folio, 0), i.e. without +* TTU_SPLIT_HUGE_PMD, so a folio that was PMD mapped in several VMAs -- after +* fork(), for instance -- ends up with a PMD sized migration entry in every one +* of them. folio_split_unmapped() below does not care, it only looks at the +* refcount, so splitting the folio without demoting all of those first would +* leave the other VMAs pointing a huge PMD at what is now an order-0 folio. +* remove_migration_ptes() trips over that in migrate_vma_finalize(). +*/ +static void migrate_vma_split_pmd_mappings (struct folio *folio) +{ +struct rmap_walk_control rwc = { + .rmap_one = migrate_vma_split_pmd_one, + }; + +/* +* Do not pass .anon_lock: folio_lock_anon_vma_read() requires +* folio_mapped(), and @folio is already fully unmapped here. +*/ +rmap_walk (folio, &rwc); +} +static int migrate_vma_split_unmapped_folio (struct migrate_vma *migrate, -unsigned long idx,unsigned long addr, +unsigned long idx,struct folio *folio) {unsigned long i;unsigned long pfn;unsigned long flags; +bool fault_folio;int ret =0 ;/* -* take a reference, since split_huge_pmd_address() with freeze = true -* drops a reference at the end. +* migrate_vma_split_pmd_mappings() walks the rmap, and +* split_huge_pmd_address() zaps rather than demotes a PMD in a VMA that +* is not anonymous. migrate_vma_collect_huge_pmd() does not check the +* VMA type, so a file THP can reach here; the rest of the migrate_vma() +* machinery only supports anonymous memory anyway. */ -folio_get (folio); -split_huge_pmd_address (migrate->vma, addr, true); +if (!folio_test_anon (folio)) +return -EINVAL ; + +/* +* A CPU fault on a device private PMD holds an extra reference on the +* folio, taken by do_huge_pmd_device_private(). folio_split_unmapped() +* only tolerates a single caller reference, so the split would always +* fail with -EAGAIN while this fault reference is held. +* +* do_huge_pmd_device_private() derives the fault page from the PMD +* entry, so it is always the head page of @folio, and therefore always +* ends up in the head folio after an uniform split to order 0. Drop +* the reference across the split and re-take it on the head folio +* afterwards, leaving the reference exactly where it is expected to be +* released. +* +* The folio cannot go away while the reference is dropped: the +* reference taken by migrate_vma_collect_huge_pmd() is still held. +*/ + fault_folio = migrate->fault_page && +page_folio (migrate->fault_page) == folio; + +migrate_vma_split_pmd_mappings (folio); + +if (fault_folio) +folio_put (folio); ret =folio_split_unmapped (folio,0 ); +if (fault_folio) +folio_get (folio); +if (ret)return ret; migrate->src[idx] &= ~MIGRATE_PFN_COMPOUND ;@@ -935,7 +1017,7 @@ static int migrate_vma_insert_huge_pmd_page(struct migrate_vma *migrate, }static int migrate_vma_split_unmapped_folio (struct migrate_vma *migrate, -unsigned long idx,unsigned long addr, +unsigned long idx,struct folio *folio) {return 0 ;@@ -1103,7 +1185,6 @@ static void __migrate_device_pages(unsigned long *src_pfns,struct mmu_notifier_range range;unsigned long i, j;bool notified = false; -unsigned long addr;for (i =0 ; i < npages; ) {struct page *newpage =migrate_pfn_to_page (dst_pfns[i]);
mm/migrate_device.c static void __migrate_device_pages(unsigned long *src_pfns, · line 1264
Quoted 9 lines
mm/migrate_device.c +1
-2@@ -1177,8 +1258,7 @@ static void __migrate_device_pages(unsigned long *src_pfns, goto next; } nr =1 <<folio_order (folio); - addr = migrate->start + i *PAGE_SIZE ; -if (migrate_vma_split_unmapped_folio (migrate, i, addr, folio)) { +if (migrate_vma_split_unmapped_folio (migrate, i, folio)) { src_pfns[i] &= ~(MIGRATE_PFN_MIGRATE |MIGRATE_PFN_COMPOUND ); goto next;
Huang, Ying
reviewerRe: [PATCH v3 3/6] mm/migrate_device: Fix THP splitting of a CPU faulted device private folio
In reply to Matthew BrostHi, Matthew,
Quoted 55 lines · Matthew Brost
When a CPU faults on a device private PMD and the device driver can only allocate order-0 destination folios,
__migrate_device_pages()has to split the source THP viamigrate_vma_split_unmapped_folio(). That path is broken in two independent ways when the fault is what triggered the migration.First, the split never succeeds. At the point
folio_split_unmapped()is called the folio carries two references beyond the ones it is entitled to:1 - taken by
do_huge_pmd_device_private()for the duration of the->migrate_to_ram() callback2 - taken by
migrate_vma_collect_huge_pmd()when the folio was
collected(the mapping reference having been dropped by
set_pmd_migration_entry()).
folio_split_unmapped()requiresfolio_expected_ref_count(folio)==folio_ref_count(folio)- 1, i.e. it tolerates exactly one caller reference. With both of the above held the check sees 2 against an expected 0 and returns-EAGAIN, so the migration is abandoned and the CPU fault makes no progress.The PTE-based split path does not have this problem:
migrate_vma_split_folio()is called before any collect reference is taken and explicitly skipsfolio_get()for the fault folio, so the fault reference is the single caller reference the split expects.Fix it by dropping the fault reference across the split and re-taking it afterwards.
do_huge_pmd_device_private()derives the fault page from the PMD entry, so it is always the head page of the folio and always ends up in the head folio of an uniform split to order 0; re-taking the reference on the folio therefore puts it back exactly wheredo_huge_pmd_device_private()will release it. The folio cannot be freed while the reference is dropped because the collect reference is still held.Second, the folio is split globally but the page tables were demoted only locally:
split_huge_pmd_address(migrate->vma, addr, true); ret = folio_split_unmapped(folio, 0);
migrate_device_unmap()unmaps viatry_to_migrate(folio, 0), deliberately withoutTTU_SPLIT_HUGE_PMD, so every VMA that PMD maps the folio is left holding a PMD sized migration entry. A folio that was PMD mapped in more than one VMA -- afterfork(), for example -- therefore keeps huge migration entries in all the other VMAs while onlymigrate->vmais demoted.
folio_split_unmapped()does not notice: the folio is fully unmapped, so it only looks at the refcount and happily splits to order 0. The other VMAs are then left pointing a huge PMD at an order-0 folio, andmigrate_vma_finalize()->remove_migration_ptes()walks into it:
Quoted 11 lines
page dumped because: VM_BUG_ON_FOLIO(folio_test_hugetlb(folio) ||
!folio_test_pmd_mappable(folio))
kernel BUG at mm/migrate.c:368!
RIP: 0010:remove_migration_pte+0x56a/0x9b0
Call Trace:
rmap_walk_anon+0xfc/0x260
remove_migration_ptes+0x79/0xb0
__migrate_device_finalize+0x113/0x290
__drm_pagemap_migrate_to_ram+0x278/0x360 [drm_gpusvm_helper]
drm_pagemap_migrate_to_ram+0x5c/0x80 [drm_gpusvm_helper]
do_huge_pmd_device_private+0x160/0x280Which is the branch your patchset based on? I found that drm_pagemap_migrate_populate_ram_pfn() in mm-everything-2026-08-08-07-08 still don't support fallback to single pages if THP allocation fails as in the following comments,
/* TODO: Support fallback to single pages if THP allocation fails */
Quoted 166 lines
Without
CONFIG_DEBUG_VMtheVM_BUG_ON_FOLIO()is compiled out andremove_migration_pmd()installs a huge PMD pointing at an order-0 page instead, along withadd_mm_counter(mm, MM_ANONPAGES, HPAGE_PMD_NR). The victim mm then maps 2MB of address space onto a single 4K page, which shows up later as bad rss-counter state, leaked page tables and page allocator freelist corruption in unrelated processes.Note this second problem was latent before the refcount fix above: the split always failed, and the failed attempt left
migrate->vmademoted, so the retried fault took the PTE path, where__folio_split()unmaps withTTU_SPLIT_HUGE_PMDand demotes every VMA.Fix it by walking the rmap and demoting every PMD sized migration entry mapping the folio before splitting it. Demote with freeze = false: entry creation in
__split_huge_pmd_locked()is dispatched onpmd_is_migration_entry(), not on freeze, so a migration PMD becomes PTE sized migration entries either way, and freeze only controls a trailingput_page(). With freeze = false there is no refcount change at all, which makes the demotion idempotent across N VMAs.rmap_walk_control.anon_lock is deliberately left unset:
folio_lock_anon_vma_read()depends onfolio_mapped(), and the folio is already fully unmapped here. This mirrorsremove_migration_ptes().Finally, refuse the split for a folio that is not anonymous. The rmap walk would otherwise reach a file backed VMA, where
split_huge_pmd_address()zaps the PMD instead of demoting it.Fixes 4265d67e405a ("mm/migrate_device: add THP splitting during migration")Cc Andrew Morton <[email protected]>Cc David Hildenbrand <[email protected]>Cc Lorenzo Stoakes <[email protected]>Cc Zi Yan <[email protected]>Cc Baolin Wang <[email protected]>Cc Liam R. Howlett <[email protected]>Cc Nico Pache <[email protected]>Cc Ryan Roberts <[email protected]>Cc Dev Jain <[email protected]>Cc Barry Song <[email protected]>Cc Lance Yang <[email protected]>Cc Usama Arif <[email protected]>Cc Joshua Hahn <[email protected]>Cc Rakie Kim <[email protected]>Cc Byungchul Park <[email protected]>Cc Gregory Price <[email protected]>Cc Ying Huang <[email protected]>Cc Alistair Popple <[email protected]>Cc Balbir Singh <[email protected]>Cc Maarten Lankhorst <[email protected]>Cc Maxime Ripard <[email protected]>Cc Thomas Zimmermann <[email protected]>Cc David Airlie <[email protected]>Cc Simona Vetter <[email protected]>Cc Thomas Hellström <[email protected]>Cc Francois Dugast <[email protected]>Assisted-by GitHub_Copilot:claude-opus-5Signed-off-by Matthew Brost <[email protected]>--- mm/migrate_device.c | 98 ++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 89 insertions(+), 9 deletions(-)mm/migrate_device.c +78
-5@@ -899,22 +899,104 @@ static int migrate_vma_insert_huge_pmd_page(struct migrate_vma *migrate,return 0 ; } +static bool migrate_vma_split_pmd_one (struct folio *folio, +struct vm_area_struct *vma, +unsigned long addr,void *arg) +{ +DEFINE_FOLIO_VMA_WALK (pvmw, folio, vma, addr,PVMW_SYNC |PVMW_MIGRATION ); + +while (page_vma_mapped_walk (&pvmw)) { +if (pvmw.pte) +continue ; + + addr = pvmw.address; +page_vma_mapped_walk_done (&pvmw); + +/* +* Demote with freeze = false: the PMD already holds a +* migration entry, so __split_huge_pmd_locked() creates PTE +* sized migration entries from it and leaves the refcount +* alone. There is at most one PMD mapping @folio per VMA, so +* stop the walk here. +*/ +split_huge_pmd_address (vma, addr, false); +break ; + } + +return true; +} + +/* +* Demote every PMD sized migration entry that maps @folio to PTE sized ones. +* +* migrate_device_unmap() unmaps with try_to_migrate(folio, 0), i.e. without +* TTU_SPLIT_HUGE_PMD, so a folio that was PMD mapped in several VMAs -- after +* fork(), for instance -- ends up with a PMD sized migration entry in every one +* of them. folio_split_unmapped() below does not care, it only looks at the +* refcount, so splitting the folio without demoting all of those first would +* leave the other VMAs pointing a huge PMD at what is now an order-0 folio. +* remove_migration_ptes() trips over that in migrate_vma_finalize(). +*/ +static void migrate_vma_split_pmd_mappings (struct folio *folio) +{ +struct rmap_walk_control rwc = { + .rmap_one = migrate_vma_split_pmd_one, + }; + +/* +* Do not pass .anon_lock: folio_lock_anon_vma_read() requires +* folio_mapped(), and @folio is already fully unmapped here. +*/ +rmap_walk (folio, &rwc); +} +static int migrate_vma_split_unmapped_folio (struct migrate_vma *migrate, -unsigned long idx,unsigned long addr, +unsigned long idx,struct folio *folio) {unsigned long i;unsigned long pfn;unsigned long flags; +bool fault_folio;int ret =0 ;/* -* take a reference, since split_huge_pmd_address() with freeze = true -* drops a reference at the end. +* migrate_vma_split_pmd_mappings() walks the rmap, and +* split_huge_pmd_address() zaps rather than demotes a PMD in a VMA that +* is not anonymous. migrate_vma_collect_huge_pmd() does not check the +* VMA type, so a file THP can reach here; the rest of the migrate_vma() +* machinery only supports anonymous memory anyway. */ -folio_get (folio); -split_huge_pmd_address (migrate->vma, addr, true); +if (!folio_test_anon (folio)) +return -EINVAL ; + +/* +* A CPU fault on a device private PMD holds an extra reference on the +* folio, taken by do_huge_pmd_device_private(). folio_split_unmapped() +* only tolerates a single caller reference, so the split would always +* fail with -EAGAIN while this fault reference is held. +* +* do_huge_pmd_device_private() derives the fault page from the PMD +* entry, so it is always the head page of @folio, and therefore always +* ends up in the head folio after an uniform split to order 0. Drop +* the reference across the split and re-take it on the head folio +* afterwards, leaving the reference exactly where it is expected to be +* released. +* +* The folio cannot go away while the reference is dropped: the +* reference taken by migrate_vma_collect_huge_pmd() is still held. +*/ + fault_folio = migrate->fault_page &&
mm/migrate_device.c static int migrate_vma_insert_huge_pmd_page(struct migrate_vma *migrate, · line 999
Quoted 10 lines
mm/migrate_device.c +9
-0+page_folio (migrate->fault_page) == folio; + +migrate_vma_split_pmd_mappings (folio); + +if (fault_folio) +folio_put (folio); ret =folio_split_unmapped (folio,0 ); +if (fault_folio) +folio_get (folio); +
Is it better to pass "extra_cnt" to folio_split_unmapped()? This follows the coding style of the other migrate functions better, like that in __migrate_device_pages().
Quoted 21 lines
mm/migrate_device.c +1
-2if (ret)return ret; migrate->src[idx] &= ~MIGRATE_PFN_COMPOUND ;@@ -935,7 +1017,7 @@ static int migrate_vma_insert_huge_pmd_page(struct migrate_vma *migrate, }static int migrate_vma_split_unmapped_folio (struct migrate_vma *migrate, -unsigned long idx,unsigned long addr, +unsigned long idx,struct folio *folio) {return 0 ;@@ -1103,7 +1185,6 @@ static void __migrate_device_pages(unsigned long *src_pfns,struct mmu_notifier_range range;unsigned long i, j;bool notified = false; -unsigned long addr;for (i =0 ; i < npages; ) {struct page *newpage =migrate_pfn_to_page (dst_pfns[i]);
mm/migrate_device.c static void __migrate_device_pages(unsigned long *src_pfns, · line 1264
Quoted 9 lines
mm/migrate_device.c +1
-2@@ -1177,8 +1258,7 @@ static void __migrate_device_pages(unsigned long *src_pfns, goto next; } nr =1 <<folio_order (folio); - addr = migrate->start + i *PAGE_SIZE ; -if (migrate_vma_split_unmapped_folio (migrate, i, addr, folio)) { +if (migrate_vma_split_unmapped_folio (migrate, i, folio)) { src_pfns[i] &= ~(MIGRATE_PFN_MIGRATE |MIGRATE_PFN_COMPOUND ); goto next;
---
Best Regards,
Huang, Ying
Matthew Brost
maintainerRe: [PATCH v3 3/6] mm/migrate_device: Fix THP splitting of a CPU faulted device private folio
Quoted 71 lines · Ying
Hi, Matthew,
Quoted 55 lines · Matthew Brost
When a CPU faults on a device private PMD and the device driver can only allocate order-0 destination folios,
__migrate_device_pages()has to split the source THP viamigrate_vma_split_unmapped_folio(). That path is broken in two independent ways when the fault is what triggered the migration.First, the split never succeeds. At the point
folio_split_unmapped()is called the folio carries two references beyond the ones it is entitled to:1 - taken by
do_huge_pmd_device_private()for the duration of the->migrate_to_ram() callback2 - taken by
migrate_vma_collect_huge_pmd()when the folio was
collected(the mapping reference having been dropped by
set_pmd_migration_entry()).
folio_split_unmapped()requiresfolio_expected_ref_count(folio)==folio_ref_count(folio)- 1, i.e. it tolerates exactly one caller reference. With both of the above held the check sees 2 against an expected 0 and returns-EAGAIN, so the migration is abandoned and the CPU fault makes no progress.The PTE-based split path does not have this problem:
migrate_vma_split_folio()is called before any collect reference is taken and explicitly skipsfolio_get()for the fault folio, so the fault reference is the single caller reference the split expects.Fix it by dropping the fault reference across the split and re-taking it afterwards.
do_huge_pmd_device_private()derives the fault page from the PMD entry, so it is always the head page of the folio and always ends up in the head folio of an uniform split to order 0; re-taking the reference on the folio therefore puts it back exactly wheredo_huge_pmd_device_private()will release it. The folio cannot be freed while the reference is dropped because the collect reference is still held.Second, the folio is split globally but the page tables were demoted only locally:
split_huge_pmd_address(migrate->vma, addr, true); ret = folio_split_unmapped(folio, 0);
migrate_device_unmap()unmaps viatry_to_migrate(folio, 0), deliberately withoutTTU_SPLIT_HUGE_PMD, so every VMA that PMD maps the folio is left holding a PMD sized migration entry. A folio that was PMD mapped in more than one VMA -- afterfork(), for example -- therefore keeps huge migration entries in all the other VMAs while onlymigrate->vmais demoted.
folio_split_unmapped()does not notice: the folio is fully unmapped, so it only looks at the refcount and happily splits to order 0. The other VMAs are then left pointing a huge PMD at an order-0 folio, andmigrate_vma_finalize()->remove_migration_ptes()walks into it:Quoted 11 lines
page dumped because: VM_BUG_ON_FOLIO(folio_test_hugetlb(folio) || !folio_test_pmd_mappable(folio)) kernel BUG at mm/migrate.c:368! RIP: 0010:remove_migration_pte+0x56a/0x9b0 Call Trace: rmap_walk_anon+0xfc/0x260 remove_migration_ptes+0x79/0xb0 __migrate_device_finalize+0x113/0x290 __drm_pagemap_migrate_to_ram+0x278/0x360 [drm_gpusvm_helper] drm_pagemap_migrate_to_ram+0x5c/0x80 [drm_gpusvm_helper] do_huge_pmd_device_private+0x160/0x280
Quoted 5 lines
Which is the branch your patchset based on? I found that
drm_pagemap_migrate_populate_ram_pfn()in mm-everything-2026-08-08-07-08 still don't support fallback to single pages if THP allocation fails as in the following comments,
This entire series, on drm-tip (i.e., the 6 patches posted here [1]).
[1] https://patchwork.freedesktop.org/series/171651/
Quoted 175 lines
/* TODO: Support fallback to single pages if THP allocation fails */Quoted 172 lines
Without
CONFIG_DEBUG_VMtheVM_BUG_ON_FOLIO()is compiled out andremove_migration_pmd()installs a huge PMD pointing at an order-0 page instead, along withadd_mm_counter(mm, MM_ANONPAGES, HPAGE_PMD_NR). The victim mm then maps 2MB of address space onto a single 4K page, which shows up later as bad rss-counter state, leaked page tables and page allocator freelist corruption in unrelated processes.Note this second problem was latent before the refcount fix above: the split always failed, and the failed attempt left
migrate->vmademoted, so the retried fault took the PTE path, where__folio_split()unmaps withTTU_SPLIT_HUGE_PMDand demotes every VMA.Fix it by walking the rmap and demoting every PMD sized migration entry mapping the folio before splitting it. Demote with freeze = false: entry creation in
__split_huge_pmd_locked()is dispatched onpmd_is_migration_entry(), not on freeze, so a migration PMD becomes PTE sized migration entries either way, and freeze only controls a trailingput_page(). With freeze = false there is no refcount change at all, which makes the demotion idempotent across N VMAs.rmap_walk_control.anon_lock is deliberately left unset:
folio_lock_anon_vma_read()depends onfolio_mapped(), and the folio is already fully unmapped here. This mirrorsremove_migration_ptes().Finally, refuse the split for a folio that is not anonymous. The rmap walk would otherwise reach a file backed VMA, where
split_huge_pmd_address()zaps the PMD instead of demoting it.Fixes 4265d67e405a ("mm/migrate_device: add THP splitting during migration")Cc Andrew Morton <[email protected]>Cc David Hildenbrand <[email protected]>Cc Lorenzo Stoakes <[email protected]>Cc Zi Yan <[email protected]>Cc Baolin Wang <[email protected]>Cc Liam R. Howlett <[email protected]>Cc Nico Pache <[email protected]>Cc Ryan Roberts <[email protected]>Cc Dev Jain <[email protected]>Cc Barry Song <[email protected]>Cc Lance Yang <[email protected]>Cc Usama Arif <[email protected]>Cc Joshua Hahn <[email protected]>Cc Rakie Kim <[email protected]>Cc Byungchul Park <[email protected]>Cc Gregory Price <[email protected]>Cc Ying Huang <[email protected]>Cc Alistair Popple <[email protected]>Cc Balbir Singh <[email protected]>Cc Maarten Lankhorst <[email protected]>Cc Maxime Ripard <[email protected]>Cc Thomas Zimmermann <[email protected]>Cc David Airlie <[email protected]>Cc Simona Vetter <[email protected]>Cc Thomas Hellström <[email protected]>Cc Francois Dugast <[email protected]>Assisted-by GitHub_Copilot:claude-opus-5Signed-off-by Matthew Brost <[email protected]>--- mm/migrate_device.c | 98 ++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 89 insertions(+), 9 deletions(-)mm/migrate_device.c +84
-5@@ -899,22 +899,104 @@ static int migrate_vma_insert_huge_pmd_page(struct migrate_vma *migrate,return 0 ; } +static bool migrate_vma_split_pmd_one (struct folio *folio, +struct vm_area_struct *vma, +unsigned long addr,void *arg) +{ +DEFINE_FOLIO_VMA_WALK (pvmw, folio, vma, addr,PVMW_SYNC |PVMW_MIGRATION ); + +while (page_vma_mapped_walk (&pvmw)) { +if (pvmw.pte) +continue ; + + addr = pvmw.address; +page_vma_mapped_walk_done (&pvmw); + +/* +* Demote with freeze = false: the PMD already holds a +* migration entry, so __split_huge_pmd_locked() creates PTE +* sized migration entries from it and leaves the refcount +* alone. There is at most one PMD mapping @folio per VMA, so +* stop the walk here. +*/ +split_huge_pmd_address (vma, addr, false); +break ; + } + +return true; +} + +/* +* Demote every PMD sized migration entry that maps @folio to PTE sized ones. +* +* migrate_device_unmap() unmaps with try_to_migrate(folio, 0), i.e. without +* TTU_SPLIT_HUGE_PMD, so a folio that was PMD mapped in several VMAs -- after +* fork(), for instance -- ends up with a PMD sized migration entry in every one +* of them. folio_split_unmapped() below does not care, it only looks at the +* refcount, so splitting the folio without demoting all of those first would +* leave the other VMAs pointing a huge PMD at what is now an order-0 folio. +* remove_migration_ptes() trips over that in migrate_vma_finalize(). +*/ +static void migrate_vma_split_pmd_mappings (struct folio *folio) +{ +struct rmap_walk_control rwc = { + .rmap_one = migrate_vma_split_pmd_one, + }; + +/* +* Do not pass .anon_lock: folio_lock_anon_vma_read() requires +* folio_mapped(), and @folio is already fully unmapped here. +*/ +rmap_walk (folio, &rwc); +} +static int migrate_vma_split_unmapped_folio (struct migrate_vma *migrate, -unsigned long idx,unsigned long addr, +unsigned long idx,struct folio *folio) {unsigned long i;unsigned long pfn;unsigned long flags; +bool fault_folio;int ret =0 ;/* -* take a reference, since split_huge_pmd_address() with freeze = true -* drops a reference at the end. +* migrate_vma_split_pmd_mappings() walks the rmap, and +* split_huge_pmd_address() zaps rather than demotes a PMD in a VMA that +* is not anonymous. migrate_vma_collect_huge_pmd() does not check the +* VMA type, so a file THP can reach here; the rest of the migrate_vma() +* machinery only supports anonymous memory anyway. */ -folio_get (folio); -split_huge_pmd_address (migrate->vma, addr, true); +if (!folio_test_anon (folio)) +return -EINVAL ; + +/* +* A CPU fault on a device private PMD holds an extra reference on the +* folio, taken by do_huge_pmd_device_private(). folio_split_unmapped() +* only tolerates a single caller reference, so the split would always +* fail with -EAGAIN while this fault reference is held. +* +* do_huge_pmd_device_private() derives the fault page from the PMD +* entry, so it is always the head page of @folio, and therefore always +* ends up in the head folio after an uniform split to order 0. Drop +* the reference across the split and re-take it on the head folio +* afterwards, leaving the reference exactly where it is expected to be +* released. +* +* The folio cannot go away while the reference is dropped: the +* reference taken by migrate_vma_collect_huge_pmd() is still held. +*/ + fault_folio = migrate->fault_page && +page_folio (migrate->fault_page) == folio; + +migrate_vma_split_pmd_mappings (folio); + +if (fault_folio) +folio_put (folio);
Quoted 9 lines
mm/migrate_device.c static int migrate_vma_insert_huge_pmd_page(struct migrate_vma *migrate, · line 999
Quoted 4 lines
mm/migrate_device.c +3
-0ret =folio_split_unmapped (folio,0 ); +if (fault_folio) +folio_get (folio); +Is it better to pass "
extra_cnt" tofolio_split_unmapped()? This follows the coding style of the other migrate functions better, like that in__migrate_device_pages().
That is an option. To be minimally invasive, I went this route. I also didn't know offhand what would happen if our head page had an extra reference and we then called folio_split_unmapped() with "extra_cnt", or how that would affect the reference counts of the newly split pages (i.e., whether we would need to adjust the reference counts of all split pages after folio_split_unmapped() returns). However, I could quickly reason that dropping the reference and then reacquiring it was functionally correct and safe.
Matt
Quoted 34 lines
Quoted 21 lines
mm/migrate_device.c +1
-2if (ret)return ret; migrate->src[idx] &= ~MIGRATE_PFN_COMPOUND ;@@ -935,7 +1017,7 @@ static int migrate_vma_insert_huge_pmd_page(struct migrate_vma *migrate, }static int migrate_vma_split_unmapped_folio (struct migrate_vma *migrate, -unsigned long idx,unsigned long addr, +unsigned long idx,struct folio *folio) {return 0 ;@@ -1103,7 +1185,6 @@ static void __migrate_device_pages(unsigned long *src_pfns,struct mmu_notifier_range range;unsigned long i, j;bool notified = false; -unsigned long addr;for (i =0 ; i < npages; ) {struct page *newpage =migrate_pfn_to_page (dst_pfns[i]);mm/migrate_device.c static void __migrate_device_pages(unsigned long *src_pfns, · line 1264
Quoted 9 lines
mm/migrate_device.c +1
-2@@ -1177,8 +1258,7 @@ static void __migrate_device_pages(unsigned long *src_pfns, goto next; } nr =1 <<folio_order (folio); - addr = migrate->start + i *PAGE_SIZE ; -if (migrate_vma_split_unmapped_folio (migrate, i, addr, folio)) { +if (migrate_vma_split_unmapped_folio (migrate, i, folio)) { src_pfns[i] &= ~(MIGRATE_PFN_MIGRATE |MIGRATE_PFN_COMPOUND ); goto next;---
Best Regards,
Huang, Ying
Huang, Ying
reviewerRe: [PATCH v3 3/6] mm/migrate_device: Fix THP splitting of a CPU faulted device private folio
Quoted 78 lines · Matthew Brost
Quoted 71 lines · Ying
Hi, Matthew,
Quoted 55 lines · Matthew Brost
When a CPU faults on a device private PMD and the device driver can only allocate order-0 destination folios,
__migrate_device_pages()has to split the source THP viamigrate_vma_split_unmapped_folio(). That path is broken in two independent ways when the fault is what triggered the migration.First, the split never succeeds. At the point
folio_split_unmapped()is called the folio carries two references beyond the ones it is entitled to:1 - taken by
do_huge_pmd_device_private()for the duration of the->migrate_to_ram() callback2 - taken by
migrate_vma_collect_huge_pmd()when the folio was
collected(the mapping reference having been dropped by
set_pmd_migration_entry()).
folio_split_unmapped()requiresfolio_expected_ref_count(folio)==folio_ref_count(folio)- 1, i.e. it tolerates exactly one caller reference. With both of the above held the check sees 2 against an expected 0 and returns-EAGAIN, so the migration is abandoned and the CPU fault makes no progress.The PTE-based split path does not have this problem:
migrate_vma_split_folio()is called before any collect reference is taken and explicitly skipsfolio_get()for the fault folio, so the fault reference is the single caller reference the split expects.Fix it by dropping the fault reference across the split and re-taking it afterwards.
do_huge_pmd_device_private()derives the fault page from the PMD entry, so it is always the head page of the folio and always ends up in the head folio of an uniform split to order 0; re-taking the reference on the folio therefore puts it back exactly wheredo_huge_pmd_device_private()will release it. The folio cannot be freed while the reference is dropped because the collect reference is still held.Second, the folio is split globally but the page tables were demoted only locally:
split_huge_pmd_address(migrate->vma, addr, true); ret = folio_split_unmapped(folio, 0);
migrate_device_unmap()unmaps viatry_to_migrate(folio, 0), deliberately withoutTTU_SPLIT_HUGE_PMD, so every VMA that PMD maps the folio is left holding a PMD sized migration entry. A folio that was PMD mapped in more than one VMA -- afterfork(), for example -- therefore keeps huge migration entries in all the other VMAs while onlymigrate->vmais demoted.
folio_split_unmapped()does not notice: the folio is fully unmapped, so it only looks at the refcount and happily splits to order 0. The other VMAs are then left pointing a huge PMD at an order-0 folio, andmigrate_vma_finalize()->remove_migration_ptes()walks into it:Quoted 11 lines
page dumped because: VM_BUG_ON_FOLIO(folio_test_hugetlb(folio) || !folio_test_pmd_mappable(folio)) kernel BUG at mm/migrate.c:368! RIP: 0010:remove_migration_pte+0x56a/0x9b0 Call Trace: rmap_walk_anon+0xfc/0x260 remove_migration_ptes+0x79/0xb0 __migrate_device_finalize+0x113/0x290 __drm_pagemap_migrate_to_ram+0x278/0x360 [drm_gpusvm_helper] drm_pagemap_migrate_to_ram+0x5c/0x80 [drm_gpusvm_helper] do_huge_pmd_device_private+0x160/0x280Quoted 5 lines
Which is the branch your patchset based on? I found that
drm_pagemap_migrate_populate_ram_pfn()in mm-everything-2026-08-08-07-08 still don't support fallback to single pages if THP allocation fails as in the following comments,
Quoted 3 lines
This entire series, on drm-tip (i.e., the 6 patches posted here [1]).
Thanks!
Quoted 185 lines
Quoted 175 lines
/* TODO: Support fallback to single pages if THP allocation fails */Quoted 172 lines
Without
CONFIG_DEBUG_VMtheVM_BUG_ON_FOLIO()is compiled out andremove_migration_pmd()installs a huge PMD pointing at an order-0 page instead, along withadd_mm_counter(mm, MM_ANONPAGES, HPAGE_PMD_NR). The victim mm then maps 2MB of address space onto a single 4K page, which shows up later as bad rss-counter state, leaked page tables and page allocator freelist corruption in unrelated processes.Note this second problem was latent before the refcount fix above: the split always failed, and the failed attempt left
migrate->vmademoted, so the retried fault took the PTE path, where__folio_split()unmaps withTTU_SPLIT_HUGE_PMDand demotes every VMA.Fix it by walking the rmap and demoting every PMD sized migration entry mapping the folio before splitting it. Demote with freeze = false: entry creation in
__split_huge_pmd_locked()is dispatched onpmd_is_migration_entry(), not on freeze, so a migration PMD becomes PTE sized migration entries either way, and freeze only controls a trailingput_page(). With freeze = false there is no refcount change at all, which makes the demotion idempotent across N VMAs.rmap_walk_control.anon_lock is deliberately left unset:
folio_lock_anon_vma_read()depends onfolio_mapped(), and the folio is already fully unmapped here. This mirrorsremove_migration_ptes().Finally, refuse the split for a folio that is not anonymous. The rmap walk would otherwise reach a file backed VMA, where
split_huge_pmd_address()zaps the PMD instead of demoting it.Fixes 4265d67e405a ("mm/migrate_device: add THP splitting during migration")Cc Andrew Morton <[email protected]>Cc David Hildenbrand <[email protected]>Cc Lorenzo Stoakes <[email protected]>Cc Zi Yan <[email protected]>Cc Baolin Wang <[email protected]>Cc Liam R. Howlett <[email protected]>Cc Nico Pache <[email protected]>Cc Ryan Roberts <[email protected]>Cc Dev Jain <[email protected]>Cc Barry Song <[email protected]>Cc Lance Yang <[email protected]>Cc Usama Arif <[email protected]>Cc Joshua Hahn <[email protected]>Cc Rakie Kim <[email protected]>Cc Byungchul Park <[email protected]>Cc Gregory Price <[email protected]>Cc Ying Huang <[email protected]>Cc Alistair Popple <[email protected]>Cc Balbir Singh <[email protected]>Cc Maarten Lankhorst <[email protected]>Cc Maxime Ripard <[email protected]>Cc Thomas Zimmermann <[email protected]>Cc David Airlie <[email protected]>Cc Simona Vetter <[email protected]>Cc Thomas Hellstrm <[email protected]>Cc Francois Dugast <[email protected]>Assisted-by GitHub_Copilot:claude-opus-5Signed-off-by Matthew Brost <[email protected]>--- mm/migrate_device.c | 98 ++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 89 insertions(+), 9 deletions(-)mm/migrate_device.c +84
-5@@ -899,22 +899,104 @@ static int migrate_vma_insert_huge_pmd_page(struct migrate_vma *migrate,return 0 ; } +static bool migrate_vma_split_pmd_one (struct folio *folio, +struct vm_area_struct *vma, +unsigned long addr,void *arg) +{ +DEFINE_FOLIO_VMA_WALK (pvmw, folio, vma, addr,PVMW_SYNC |PVMW_MIGRATION ); + +while (page_vma_mapped_walk (&pvmw)) { +if (pvmw.pte) +continue ; + + addr = pvmw.address; +page_vma_mapped_walk_done (&pvmw); + +/* +* Demote with freeze = false: the PMD already holds a +* migration entry, so __split_huge_pmd_locked() creates PTE +* sized migration entries from it and leaves the refcount +* alone. There is at most one PMD mapping @folio per VMA, so +* stop the walk here. +*/ +split_huge_pmd_address (vma, addr, false); +break ; + } + +return true; +} + +/* +* Demote every PMD sized migration entry that maps @folio to PTE sized ones. +* +* migrate_device_unmap() unmaps with try_to_migrate(folio, 0), i.e. without +* TTU_SPLIT_HUGE_PMD, so a folio that was PMD mapped in several VMAs -- after +* fork(), for instance -- ends up with a PMD sized migration entry in every one +* of them. folio_split_unmapped() below does not care, it only looks at the +* refcount, so splitting the folio without demoting all of those first would +* leave the other VMAs pointing a huge PMD at what is now an order-0 folio. +* remove_migration_ptes() trips over that in migrate_vma_finalize(). +*/ +static void migrate_vma_split_pmd_mappings (struct folio *folio) +{ +struct rmap_walk_control rwc = { + .rmap_one = migrate_vma_split_pmd_one, + }; + +/* +* Do not pass .anon_lock: folio_lock_anon_vma_read() requires +* folio_mapped(), and @folio is already fully unmapped here. +*/ +rmap_walk (folio, &rwc); +} +static int migrate_vma_split_unmapped_folio (struct migrate_vma *migrate, -unsigned long idx,unsigned long addr, +unsigned long idx,struct folio *folio) {unsigned long i;unsigned long pfn;unsigned long flags; +bool fault_folio;int ret =0 ;/* -* take a reference, since split_huge_pmd_address() with freeze = true -* drops a reference at the end. +* migrate_vma_split_pmd_mappings() walks the rmap, and +* split_huge_pmd_address() zaps rather than demotes a PMD in a VMA that +* is not anonymous. migrate_vma_collect_huge_pmd() does not check the +* VMA type, so a file THP can reach here; the rest of the migrate_vma() +* machinery only supports anonymous memory anyway. */ -folio_get (folio); -split_huge_pmd_address (migrate->vma, addr, true); +if (!folio_test_anon (folio)) +return -EINVAL ; + +/* +* A CPU fault on a device private PMD holds an extra reference on the +* folio, taken by do_huge_pmd_device_private(). folio_split_unmapped() +* only tolerates a single caller reference, so the split would always +* fail with -EAGAIN while this fault reference is held. +* +* do_huge_pmd_device_private() derives the fault page from the PMD +* entry, so it is always the head page of @folio, and therefore always +* ends up in the head folio after an uniform split to order 0. Drop +* the reference across the split and re-take it on the head folio +* afterwards, leaving the reference exactly where it is expected to be +* released. +* +* The folio cannot go away while the reference is dropped: the +* reference taken by migrate_vma_collect_huge_pmd() is still held. +*/ + fault_folio = migrate->fault_page && +page_folio (migrate->fault_page) == folio; + +migrate_vma_split_pmd_mappings (folio); + +if (fault_folio) +folio_put (folio);Quoted 9 lines
mm/migrate_device.c static int migrate_vma_insert_huge_pmd_page(struct migrate_vma *migrate, · line 999
Quoted 4 lines
mm/migrate_device.c +3
-0ret =folio_split_unmapped (folio,0 ); +if (fault_folio) +folio_get (folio); +Is it better to pass "
extra_cnt" tofolio_split_unmapped()? This follows the coding style of the other migrate functions better, like that in__migrate_device_pages().
Quoted 8 lines
That is an option. To be minimally invasive, I went this route. I also didn't know offhand what would happen if our head page had an extra reference and we then called
folio_split_unmapped()with "extra_cnt", or how that would affect the reference counts of the newly split pages (i.e., whether we would need to adjust the reference counts of all split pages afterfolio_split_unmapped()returns). However, I could quickly reason that dropping the reference and then reacquiring it was functionally correct and safe.
This makes sense for me. Thanks!
I have another question. If we have to split the large folio when migrating from device to ram, should we still migrate all pages of the original large folio, or should we migrate only the faulting normal-sized page of the original large folio instead?
---
Best Regards,
Huang, Ying
Quoted 36 lines
Matt
Quoted 34 lines
Quoted 21 lines
mm/migrate_device.c +1
-2if (ret)return ret; migrate->src[idx] &= ~MIGRATE_PFN_COMPOUND ;@@ -935,7 +1017,7 @@ static int migrate_vma_insert_huge_pmd_page(struct migrate_vma *migrate, }static int migrate_vma_split_unmapped_folio (struct migrate_vma *migrate, -unsigned long idx,unsigned long addr, +unsigned long idx,struct folio *folio) {return 0 ;@@ -1103,7 +1185,6 @@ static void __migrate_device_pages(unsigned long *src_pfns,struct mmu_notifier_range range;unsigned long i, j;bool notified = false; -unsigned long addr;for (i =0 ; i < npages; ) {struct page *newpage =migrate_pfn_to_page (dst_pfns[i]);mm/migrate_device.c static void __migrate_device_pages(unsigned long *src_pfns, · line 1264
Quoted 9 lines
mm/migrate_device.c +1
-2@@ -1177,8 +1258,7 @@ static void __migrate_device_pages(unsigned long *src_pfns, goto next; } nr =1 <<folio_order (folio); - addr = migrate->start + i *PAGE_SIZE ; -if (migrate_vma_split_unmapped_folio (migrate, i, addr, folio)) { +if (migrate_vma_split_unmapped_folio (migrate, i, folio)) { src_pfns[i] &= ~(MIGRATE_PFN_MIGRATE |MIGRATE_PFN_COMPOUND ); goto next;---
Best Regards,
Huang, Ying
Matthew Brost
maintainerRe: [PATCH v3 3/6] mm/migrate_device: Fix THP splitting of a CPU faulted device private folio
Quoted 280 lines · Ying
Quoted 78 lines · Matthew Brost
Quoted 71 lines · Ying
Hi, Matthew,
Quoted 55 lines · Matthew Brost
When a CPU faults on a device private PMD and the device driver can only allocate order-0 destination folios,
__migrate_device_pages()has to split the source THP viamigrate_vma_split_unmapped_folio(). That path is broken in two independent ways when the fault is what triggered the migration.First, the split never succeeds. At the point
folio_split_unmapped()is called the folio carries two references beyond the ones it is entitled to:1 - taken by
do_huge_pmd_device_private()for the duration of the->migrate_to_ram() callback2 - taken by
migrate_vma_collect_huge_pmd()when the folio was
collected(the mapping reference having been dropped by
set_pmd_migration_entry()).
folio_split_unmapped()requiresfolio_expected_ref_count(folio)==folio_ref_count(folio)- 1, i.e. it tolerates exactly one caller reference. With both of the above held the check sees 2 against an expected 0 and returns-EAGAIN, so the migration is abandoned and the CPU fault makes no progress.The PTE-based split path does not have this problem:
migrate_vma_split_folio()is called before any collect reference is taken and explicitly skipsfolio_get()for the fault folio, so the fault reference is the single caller reference the split expects.Fix it by dropping the fault reference across the split and re-taking it afterwards.
do_huge_pmd_device_private()derives the fault page from the PMD entry, so it is always the head page of the folio and always ends up in the head folio of an uniform split to order 0; re-taking the reference on the folio therefore puts it back exactly wheredo_huge_pmd_device_private()will release it. The folio cannot be freed while the reference is dropped because the collect reference is still held.Second, the folio is split globally but the page tables were demoted only locally:
split_huge_pmd_address(migrate->vma, addr, true); ret = folio_split_unmapped(folio, 0);
migrate_device_unmap()unmaps viatry_to_migrate(folio, 0), deliberately withoutTTU_SPLIT_HUGE_PMD, so every VMA that PMD maps the folio is left holding a PMD sized migration entry. A folio that was PMD mapped in more than one VMA -- afterfork(), for example -- therefore keeps huge migration entries in all the other VMAs while onlymigrate->vmais demoted.
folio_split_unmapped()does not notice: the folio is fully unmapped, so it only looks at the refcount and happily splits to order 0. The other VMAs are then left pointing a huge PMD at an order-0 folio, andmigrate_vma_finalize()->remove_migration_ptes()walks into it:Quoted 11 lines
page dumped because: VM_BUG_ON_FOLIO(folio_test_hugetlb(folio) || !folio_test_pmd_mappable(folio)) kernel BUG at mm/migrate.c:368! RIP: 0010:remove_migration_pte+0x56a/0x9b0 Call Trace: rmap_walk_anon+0xfc/0x260 remove_migration_ptes+0x79/0xb0 __migrate_device_finalize+0x113/0x290 __drm_pagemap_migrate_to_ram+0x278/0x360 [drm_gpusvm_helper] drm_pagemap_migrate_to_ram+0x5c/0x80 [drm_gpusvm_helper] do_huge_pmd_device_private+0x160/0x280Quoted 5 lines
Which is the branch your patchset based on? I found that
drm_pagemap_migrate_populate_ram_pfn()in mm-everything-2026-08-08-07-08 still don't support fallback to single pages if THP allocation fails as in the following comments,Quoted 3 lines
This entire series, on drm-tip (i.e., the 6 patches posted here [1]).
Thanks!
Quoted 185 lines
Quoted 175 lines
/* TODO: Support fallback to single pages if THP allocation fails */Quoted 172 lines
Without
CONFIG_DEBUG_VMtheVM_BUG_ON_FOLIO()is compiled out andremove_migration_pmd()installs a huge PMD pointing at an order-0 page instead, along withadd_mm_counter(mm, MM_ANONPAGES, HPAGE_PMD_NR). The victim mm then maps 2MB of address space onto a single 4K page, which shows up later as bad rss-counter state, leaked page tables and page allocator freelist corruption in unrelated processes.Note this second problem was latent before the refcount fix above: the split always failed, and the failed attempt left
migrate->vmademoted, so the retried fault took the PTE path, where__folio_split()unmaps withTTU_SPLIT_HUGE_PMDand demotes every VMA.Fix it by walking the rmap and demoting every PMD sized migration entry mapping the folio before splitting it. Demote with freeze = false: entry creation in
__split_huge_pmd_locked()is dispatched onpmd_is_migration_entry(), not on freeze, so a migration PMD becomes PTE sized migration entries either way, and freeze only controls a trailingput_page(). With freeze = false there is no refcount change at all, which makes the demotion idempotent across N VMAs.rmap_walk_control.anon_lock is deliberately left unset:
folio_lock_anon_vma_read()depends onfolio_mapped(), and the folio is already fully unmapped here. This mirrorsremove_migration_ptes().Finally, refuse the split for a folio that is not anonymous. The rmap walk would otherwise reach a file backed VMA, where
split_huge_pmd_address()zaps the PMD instead of demoting it.Fixes 4265d67e405a ("mm/migrate_device: add THP splitting during migration")Cc Andrew Morton <[email protected]>Cc David Hildenbrand <[email protected]>Cc Lorenzo Stoakes <[email protected]>Cc Zi Yan <[email protected]>Cc Baolin Wang <[email protected]>Cc Liam R. Howlett <[email protected]>Cc Nico Pache <[email protected]>Cc Ryan Roberts <[email protected]>Cc Dev Jain <[email protected]>Cc Barry Song <[email protected]>Cc Lance Yang <[email protected]>Cc Usama Arif <[email protected]>Cc Joshua Hahn <[email protected]>Cc Rakie Kim <[email protected]>Cc Byungchul Park <[email protected]>Cc Gregory Price <[email protected]>Cc Ying Huang <[email protected]>Cc Alistair Popple <[email protected]>Cc Balbir Singh <[email protected]>Cc Maarten Lankhorst <[email protected]>Cc Maxime Ripard <[email protected]>Cc Thomas Zimmermann <[email protected]>Cc David Airlie <[email protected]>Cc Simona Vetter <[email protected]>Cc Thomas Hellstrm <[email protected]>Cc Francois Dugast <[email protected]>Assisted-by GitHub_Copilot:claude-opus-5Signed-off-by Matthew Brost <[email protected]>--- mm/migrate_device.c | 98 ++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 89 insertions(+), 9 deletions(-)mm/migrate_device.c +84
-5@@ -899,22 +899,104 @@ static int migrate_vma_insert_huge_pmd_page(struct migrate_vma *migrate,return 0 ; } +static bool migrate_vma_split_pmd_one (struct folio *folio, +struct vm_area_struct *vma, +unsigned long addr,void *arg) +{ +DEFINE_FOLIO_VMA_WALK (pvmw, folio, vma, addr,PVMW_SYNC |PVMW_MIGRATION ); + +while (page_vma_mapped_walk (&pvmw)) { +if (pvmw.pte) +continue ; + + addr = pvmw.address; +page_vma_mapped_walk_done (&pvmw); + +/* +* Demote with freeze = false: the PMD already holds a +* migration entry, so __split_huge_pmd_locked() creates PTE +* sized migration entries from it and leaves the refcount +* alone. There is at most one PMD mapping @folio per VMA, so +* stop the walk here. +*/ +split_huge_pmd_address (vma, addr, false); +break ; + } + +return true; +} + +/* +* Demote every PMD sized migration entry that maps @folio to PTE sized ones. +* +* migrate_device_unmap() unmaps with try_to_migrate(folio, 0), i.e. without +* TTU_SPLIT_HUGE_PMD, so a folio that was PMD mapped in several VMAs -- after +* fork(), for instance -- ends up with a PMD sized migration entry in every one +* of them. folio_split_unmapped() below does not care, it only looks at the +* refcount, so splitting the folio without demoting all of those first would +* leave the other VMAs pointing a huge PMD at what is now an order-0 folio. +* remove_migration_ptes() trips over that in migrate_vma_finalize(). +*/ +static void migrate_vma_split_pmd_mappings (struct folio *folio) +{ +struct rmap_walk_control rwc = { + .rmap_one = migrate_vma_split_pmd_one, + }; + +/* +* Do not pass .anon_lock: folio_lock_anon_vma_read() requires +* folio_mapped(), and @folio is already fully unmapped here. +*/ +rmap_walk (folio, &rwc); +} +static int migrate_vma_split_unmapped_folio (struct migrate_vma *migrate, -unsigned long idx,unsigned long addr, +unsigned long idx,struct folio *folio) {unsigned long i;unsigned long pfn;unsigned long flags; +bool fault_folio;int ret =0 ;/* -* take a reference, since split_huge_pmd_address() with freeze = true -* drops a reference at the end. +* migrate_vma_split_pmd_mappings() walks the rmap, and +* split_huge_pmd_address() zaps rather than demotes a PMD in a VMA that +* is not anonymous. migrate_vma_collect_huge_pmd() does not check the +* VMA type, so a file THP can reach here; the rest of the migrate_vma() +* machinery only supports anonymous memory anyway. */ -folio_get (folio); -split_huge_pmd_address (migrate->vma, addr, true); +if (!folio_test_anon (folio)) +return -EINVAL ; + +/* +* A CPU fault on a device private PMD holds an extra reference on the +* folio, taken by do_huge_pmd_device_private(). folio_split_unmapped() +* only tolerates a single caller reference, so the split would always +* fail with -EAGAIN while this fault reference is held. +* +* do_huge_pmd_device_private() derives the fault page from the PMD +* entry, so it is always the head page of @folio, and therefore always +* ends up in the head folio after an uniform split to order 0. Drop +* the reference across the split and re-take it on the head folio +* afterwards, leaving the reference exactly where it is expected to be +* released. +* +* The folio cannot go away while the reference is dropped: the +* reference taken by migrate_vma_collect_huge_pmd() is still held. +*/ + fault_folio = migrate->fault_page && +page_folio (migrate->fault_page) == folio; + +migrate_vma_split_pmd_mappings (folio); + +if (fault_folio) +folio_put (folio);Quoted 9 lines
mm/migrate_device.c static int migrate_vma_insert_huge_pmd_page(struct migrate_vma *migrate, · line 999
Quoted 4 lines
mm/migrate_device.c +3
-0ret =folio_split_unmapped (folio,0 ); +if (fault_folio) +folio_get (folio); +Is it better to pass "
extra_cnt" tofolio_split_unmapped()? This follows the coding style of the other migrate functions better, like that in__migrate_device_pages().Quoted 8 lines
That is an option. To be minimally invasive, I went this route. I also didn't know offhand what would happen if our head page had an extra reference and we then called
folio_split_unmapped()with "extra_cnt", or how that would affect the reference counts of the newly split pages (i.e., whether we would need to adjust the reference counts of all split pages afterfolio_split_unmapped()returns). However, I could quickly reason that dropping the reference and then reacquiring it was functionally correct and safe.
Quoted 7 lines
This makes sense for me. Thanks!
I have another question. If we have to split the large folio when migrating from device to ram, should we still migrate all pages of the original large folio, or should we migrate only the faulting normal-sized page of the original large folio instead?
This is a choice made by the upper layers that call the migrate_vma_* functions and populate the migrate_vma arguments. In gpusvm/pagemap, we still migrate the entire 2 MB region of memory as 512 4 KB pages upon higher order failure, matching what we did prior to having 2 MB device pages.
The reasoning is that migrations are expensive due to the CPU overhead of migrate_vma_* and because GPU copies are issued, requiring larger transfer sizes to achieve the full bandwidth of the bus. For example, a 4 KB copy provides less than 1 GB/s of bandwidth regardless of PCIe speed, whereas a 2 MB copy can nearly reach the theoretical maximum bandwidth of PCIe.
Early in the development of gpusvm/pagemap, I had a knob that forced only single-page 4 KB faults and migrations, along with a test case that measured the fault time in user space for a 2 MB buffer. If I recall correctly, it was about 58× slower than batching 512 4 KB pages together into a single fault and migration on a low-end BMG part.
So on higher order page allocation failure, the preference is still do the larger migration.
Matt
Quoted 40 lines
---
Best Regards,
Huang, YingQuoted 36 lines
Matt
Quoted 34 lines
Quoted 21 lines
mm/migrate_device.c +1
-2if (ret)return ret; migrate->src[idx] &= ~MIGRATE_PFN_COMPOUND ;@@ -935,7 +1017,7 @@ static int migrate_vma_insert_huge_pmd_page(struct migrate_vma *migrate, }static int migrate_vma_split_unmapped_folio (struct migrate_vma *migrate, -unsigned long idx,unsigned long addr, +unsigned long idx,struct folio *folio) {return 0 ;@@ -1103,7 +1185,6 @@ static void __migrate_device_pages(unsigned long *src_pfns,struct mmu_notifier_range range;unsigned long i, j;bool notified = false; -unsigned long addr;for (i =0 ; i < npages; ) {struct page *newpage =migrate_pfn_to_page (dst_pfns[i]);mm/migrate_device.c static void __migrate_device_pages(unsigned long *src_pfns, · line 1264
Quoted 9 lines
mm/migrate_device.c +1
-2@@ -1177,8 +1258,7 @@ static void __migrate_device_pages(unsigned long *src_pfns, goto next; } nr =1 <<folio_order (folio); - addr = migrate->start + i *PAGE_SIZE ; -if (migrate_vma_split_unmapped_folio (migrate, i, addr, folio)) { +if (migrate_vma_split_unmapped_folio (migrate, i, folio)) { src_pfns[i] &= ~(MIGRATE_PFN_MIGRATE |MIGRATE_PFN_COMPOUND ); goto next;---
Best Regards,
Huang, Ying
Huang, Ying
reviewerRe: [PATCH v3 3/6] mm/migrate_device: Fix THP splitting of a CPU faulted device private folio
Quoted 301 lines · Matthew Brost
Quoted 280 lines · Ying
Quoted 78 lines · Matthew Brost
Quoted 71 lines · Ying
Hi, Matthew,
Quoted 55 lines · Matthew Brost
When a CPU faults on a device private PMD and the device driver can only allocate order-0 destination folios,
__migrate_device_pages()has to split the source THP viamigrate_vma_split_unmapped_folio(). That path is broken in two independent ways when the fault is what triggered the migration.First, the split never succeeds. At the point
folio_split_unmapped()is called the folio carries two references beyond the ones it is entitled to:1 - taken by
do_huge_pmd_device_private()for the duration of the->migrate_to_ram() callback2 - taken by
migrate_vma_collect_huge_pmd()when the folio was
collected(the mapping reference having been dropped by
set_pmd_migration_entry()).
folio_split_unmapped()requiresfolio_expected_ref_count(folio)==folio_ref_count(folio)- 1, i.e. it tolerates exactly one caller reference. With both of the above held the check sees 2 against an expected 0 and returns-EAGAIN, so the migration is abandoned and the CPU fault makes no progress.The PTE-based split path does not have this problem:
migrate_vma_split_folio()is called before any collect reference is taken and explicitly skipsfolio_get()for the fault folio, so the fault reference is the single caller reference the split expects.Fix it by dropping the fault reference across the split and re-taking it afterwards.
do_huge_pmd_device_private()derives the fault page from the PMD entry, so it is always the head page of the folio and always ends up in the head folio of an uniform split to order 0; re-taking the reference on the folio therefore puts it back exactly wheredo_huge_pmd_device_private()will release it. The folio cannot be freed while the reference is dropped because the collect reference is still held.Second, the folio is split globally but the page tables were demoted only locally:
split_huge_pmd_address(migrate->vma, addr, true); ret = folio_split_unmapped(folio, 0);
migrate_device_unmap()unmaps viatry_to_migrate(folio, 0), deliberately withoutTTU_SPLIT_HUGE_PMD, so every VMA that PMD maps the folio is left holding a PMD sized migration entry. A folio that was PMD mapped in more than one VMA -- afterfork(), for example -- therefore keeps huge migration entries in all the other VMAs while onlymigrate->vmais demoted.
folio_split_unmapped()does not notice: the folio is fully unmapped, so it only looks at the refcount and happily splits to order 0. The other VMAs are then left pointing a huge PMD at an order-0 folio, andmigrate_vma_finalize()->remove_migration_ptes()walks into it:Quoted 11 lines
page dumped because: VM_BUG_ON_FOLIO(folio_test_hugetlb(folio) || !folio_test_pmd_mappable(folio)) kernel BUG at mm/migrate.c:368! RIP: 0010:remove_migration_pte+0x56a/0x9b0 Call Trace: rmap_walk_anon+0xfc/0x260 remove_migration_ptes+0x79/0xb0 __migrate_device_finalize+0x113/0x290 __drm_pagemap_migrate_to_ram+0x278/0x360 [drm_gpusvm_helper] drm_pagemap_migrate_to_ram+0x5c/0x80 [drm_gpusvm_helper] do_huge_pmd_device_private+0x160/0x280Quoted 5 lines
Which is the branch your patchset based on? I found that
drm_pagemap_migrate_populate_ram_pfn()in mm-everything-2026-08-08-07-08 still don't support fallback to single pages if THP allocation fails as in the following comments,Quoted 3 lines
This entire series, on drm-tip (i.e., the 6 patches posted here [1]).
Thanks!
Quoted 185 lines
Quoted 175 lines
/* TODO: Support fallback to single pages if THP allocation fails */Quoted 172 lines
Without
CONFIG_DEBUG_VMtheVM_BUG_ON_FOLIO()is compiled out andremove_migration_pmd()installs a huge PMD pointing at an order-0 page instead, along withadd_mm_counter(mm, MM_ANONPAGES, HPAGE_PMD_NR). The victim mm then maps 2MB of address space onto a single 4K page, which shows up later as bad rss-counter state, leaked page tables and page allocator freelist corruption in unrelated processes.Note this second problem was latent before the refcount fix above: the split always failed, and the failed attempt left
migrate->vmademoted, so the retried fault took the PTE path, where__folio_split()unmaps withTTU_SPLIT_HUGE_PMDand demotes every VMA.Fix it by walking the rmap and demoting every PMD sized migration entry mapping the folio before splitting it. Demote with freeze = false: entry creation in
__split_huge_pmd_locked()is dispatched onpmd_is_migration_entry(), not on freeze, so a migration PMD becomes PTE sized migration entries either way, and freeze only controls a trailingput_page(). With freeze = false there is no refcount change at all, which makes the demotion idempotent across N VMAs.rmap_walk_control.anon_lock is deliberately left unset:
folio_lock_anon_vma_read()depends onfolio_mapped(), and the folio is already fully unmapped here. This mirrorsremove_migration_ptes().Finally, refuse the split for a folio that is not anonymous. The rmap walk would otherwise reach a file backed VMA, where
split_huge_pmd_address()zaps the PMD instead of demoting it.Fixes 4265d67e405a ("mm/migrate_device: add THP splitting during migration")Cc Andrew Morton <[email protected]>Cc David Hildenbrand <[email protected]>Cc Lorenzo Stoakes <[email protected]>Cc Zi Yan <[email protected]>Cc Baolin Wang <[email protected]>Cc Liam R. Howlett <[email protected]>Cc Nico Pache <[email protected]>Cc Ryan Roberts <[email protected]>Cc Dev Jain <[email protected]>Cc Barry Song <[email protected]>Cc Lance Yang <[email protected]>Cc Usama Arif <[email protected]>Cc Joshua Hahn <[email protected]>Cc Rakie Kim <[email protected]>Cc Byungchul Park <[email protected]>Cc Gregory Price <[email protected]>Cc Ying Huang <[email protected]>Cc Alistair Popple <[email protected]>Cc Balbir Singh <[email protected]>Cc Maarten Lankhorst <[email protected]>Cc Maxime Ripard <[email protected]>Cc Thomas Zimmermann <[email protected]>Cc David Airlie <[email protected]>Cc Simona Vetter <[email protected]>Cc Thomas Hellstrm <[email protected]>Cc Francois Dugast <[email protected]>Assisted-by GitHub_Copilot:claude-opus-5Signed-off-by Matthew Brost <[email protected]>--- mm/migrate_device.c | 98 ++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 89 insertions(+), 9 deletions(-)mm/migrate_device.c +84
-5@@ -899,22 +899,104 @@ static int migrate_vma_insert_huge_pmd_page(struct migrate_vma *migrate,return 0 ; } +static bool migrate_vma_split_pmd_one (struct folio *folio, +struct vm_area_struct *vma, +unsigned long addr,void *arg) +{ +DEFINE_FOLIO_VMA_WALK (pvmw, folio, vma, addr,PVMW_SYNC |PVMW_MIGRATION ); + +while (page_vma_mapped_walk (&pvmw)) { +if (pvmw.pte) +continue ; + + addr = pvmw.address; +page_vma_mapped_walk_done (&pvmw); + +/* +* Demote with freeze = false: the PMD already holds a +* migration entry, so __split_huge_pmd_locked() creates PTE +* sized migration entries from it and leaves the refcount +* alone. There is at most one PMD mapping @folio per VMA, so +* stop the walk here. +*/ +split_huge_pmd_address (vma, addr, false); +break ; + } + +return true; +} + +/* +* Demote every PMD sized migration entry that maps @folio to PTE sized ones. +* +* migrate_device_unmap() unmaps with try_to_migrate(folio, 0), i.e. without +* TTU_SPLIT_HUGE_PMD, so a folio that was PMD mapped in several VMAs -- after +* fork(), for instance -- ends up with a PMD sized migration entry in every one +* of them. folio_split_unmapped() below does not care, it only looks at the +* refcount, so splitting the folio without demoting all of those first would +* leave the other VMAs pointing a huge PMD at what is now an order-0 folio. +* remove_migration_ptes() trips over that in migrate_vma_finalize(). +*/ +static void migrate_vma_split_pmd_mappings (struct folio *folio) +{ +struct rmap_walk_control rwc = { + .rmap_one = migrate_vma_split_pmd_one, + }; + +/* +* Do not pass .anon_lock: folio_lock_anon_vma_read() requires +* folio_mapped(), and @folio is already fully unmapped here. +*/ +rmap_walk (folio, &rwc); +} +static int migrate_vma_split_unmapped_folio (struct migrate_vma *migrate, -unsigned long idx,unsigned long addr, +unsigned long idx,struct folio *folio) {unsigned long i;unsigned long pfn;unsigned long flags; +bool fault_folio;int ret =0 ;/* -* take a reference, since split_huge_pmd_address() with freeze = true -* drops a reference at the end. +* migrate_vma_split_pmd_mappings() walks the rmap, and +* split_huge_pmd_address() zaps rather than demotes a PMD in a VMA that +* is not anonymous. migrate_vma_collect_huge_pmd() does not check the +* VMA type, so a file THP can reach here; the rest of the migrate_vma() +* machinery only supports anonymous memory anyway. */ -folio_get (folio); -split_huge_pmd_address (migrate->vma, addr, true); +if (!folio_test_anon (folio)) +return -EINVAL ; + +/* +* A CPU fault on a device private PMD holds an extra reference on the +* folio, taken by do_huge_pmd_device_private(). folio_split_unmapped() +* only tolerates a single caller reference, so the split would always +* fail with -EAGAIN while this fault reference is held. +* +* do_huge_pmd_device_private() derives the fault page from the PMD +* entry, so it is always the head page of @folio, and therefore always +* ends up in the head folio after an uniform split to order 0. Drop +* the reference across the split and re-take it on the head folio +* afterwards, leaving the reference exactly where it is expected to be +* released. +* +* The folio cannot go away while the reference is dropped: the +* reference taken by migrate_vma_collect_huge_pmd() is still held. +*/ + fault_folio = migrate->fault_page && +page_folio (migrate->fault_page) == folio; + +migrate_vma_split_pmd_mappings (folio); + +if (fault_folio) +folio_put (folio);Quoted 9 lines
mm/migrate_device.c static int migrate_vma_insert_huge_pmd_page(struct migrate_vma *migrate, · line 999
Quoted 4 lines
mm/migrate_device.c +3
-0ret =folio_split_unmapped (folio,0 ); +if (fault_folio) +folio_get (folio); +Is it better to pass "
extra_cnt" tofolio_split_unmapped()? This follows the coding style of the other migrate functions better, like that in__migrate_device_pages().Quoted 8 lines
That is an option. To be minimally invasive, I went this route. I also didn't know offhand what would happen if our head page had an extra reference and we then called
folio_split_unmapped()with "extra_cnt", or how that would affect the reference counts of the newly split pages (i.e., whether we would need to adjust the reference counts of all split pages afterfolio_split_unmapped()returns). However, I could quickly reason that dropping the reference and then reacquiring it was functionally correct and safe.Quoted 7 lines
This makes sense for me. Thanks!
I have another question. If we have to split the large folio when migrating from device to ram, should we still migrate all pages of the original large folio, or should we migrate only the faulting normal-sized page of the original large folio instead?
This is a choice made by the upper layers that call the migrate_vma_* functions and populate the
migrate_vmaarguments. In gpusvm/pagemap, we still migrate the entire 2 MB region of memory as 512 4 KB pages upon higher order failure, matching what we did prior to having 2 MB device pages.The reasoning is that migrations are expensive due to the CPU overhead of migrate_vma_* and because GPU copies are issued, requiring larger transfer sizes to achieve the full bandwidth of the bus. For example, a 4 KB copy provides less than 1 GB/s of bandwidth regardless of PCIe speed, whereas a 2 MB copy can nearly reach the theoretical maximum bandwidth of PCIe.
Quoted 8 lines
Early in the development of gpusvm/pagemap, I had a knob that forced only single-page 4 KB faults and migrations, along with a test case that measured the fault time in user space for a 2 MB buffer. If I recall correctly, it was about 58 slower than batching 512 4 KB pages together into a single fault and migration on a low-end BMG part.
So on higher order page allocation failure, the preference is still do the larger migration.
Got it! Thanks for detailed explanation!
I think that another added complexity is that we need to split the 2MB page table of the GPU side.
---
Best Regards,
Huang, Ying
Quoted 42 lines
Matt
Quoted 40 lines
---
Best Regards,
Huang, YingQuoted 36 lines
Matt
Quoted 34 lines
Quoted 21 lines
mm/migrate_device.c +1
-2if (ret)return ret; migrate->src[idx] &= ~MIGRATE_PFN_COMPOUND ;@@ -935,7 +1017,7 @@ static int migrate_vma_insert_huge_pmd_page(struct migrate_vma *migrate, }static int migrate_vma_split_unmapped_folio (struct migrate_vma *migrate, -unsigned long idx,unsigned long addr, +unsigned long idx,struct folio *folio) {return 0 ;@@ -1103,7 +1185,6 @@ static void __migrate_device_pages(unsigned long *src_pfns,struct mmu_notifier_range range;unsigned long i, j;bool notified = false; -unsigned long addr;for (i =0 ; i < npages; ) {struct page *newpage =migrate_pfn_to_page (dst_pfns[i]);mm/migrate_device.c static void __migrate_device_pages(unsigned long *src_pfns, · line 1264
Quoted 9 lines
mm/migrate_device.c +1
-2@@ -1177,8 +1258,7 @@ static void __migrate_device_pages(unsigned long *src_pfns, goto next; } nr =1 <<folio_order (folio); - addr = migrate->start + i *PAGE_SIZE ; -if (migrate_vma_split_unmapped_folio (migrate, i, addr, folio)) { +if (migrate_vma_split_unmapped_folio (migrate, i, folio)) { src_pfns[i] &= ~(MIGRATE_PFN_MIGRATE |MIGRATE_PFN_COMPOUND ); goto next;---
Best Regards,
Huang, Ying
Matthew Brost
maintainerRe: [PATCH v3 3/6] mm/migrate_device: Fix THP splitting of a CPU faulted device private folio
Quoted 309 lines · Ying
Quoted 307 lines · Matthew Brost
Quoted 280 lines · Ying
Quoted 78 lines · Matthew Brost
Quoted 71 lines · Ying
Hi, Matthew,
Quoted 55 lines · Matthew Brost
When a CPU faults on a device private PMD and the device driver can only allocate order-0 destination folios,
__migrate_device_pages()has to split the source THP viamigrate_vma_split_unmapped_folio(). That path is broken in two independent ways when the fault is what triggered the migration.First, the split never succeeds. At the point
folio_split_unmapped()is called the folio carries two references beyond the ones it is entitled to:1 - taken by
do_huge_pmd_device_private()for the duration of the->migrate_to_ram() callback2 - taken by
migrate_vma_collect_huge_pmd()when the folio was
collected(the mapping reference having been dropped by
set_pmd_migration_entry()).
folio_split_unmapped()requiresfolio_expected_ref_count(folio)==folio_ref_count(folio)- 1, i.e. it tolerates exactly one caller reference. With both of the above held the check sees 2 against an expected 0 and returns-EAGAIN, so the migration is abandoned and the CPU fault makes no progress.The PTE-based split path does not have this problem:
migrate_vma_split_folio()is called before any collect reference is taken and explicitly skipsfolio_get()for the fault folio, so the fault reference is the single caller reference the split expects.Fix it by dropping the fault reference across the split and re-taking it afterwards.
do_huge_pmd_device_private()derives the fault page from the PMD entry, so it is always the head page of the folio and always ends up in the head folio of an uniform split to order 0; re-taking the reference on the folio therefore puts it back exactly wheredo_huge_pmd_device_private()will release it. The folio cannot be freed while the reference is dropped because the collect reference is still held.Second, the folio is split globally but the page tables were demoted only locally:
split_huge_pmd_address(migrate->vma, addr, true); ret = folio_split_unmapped(folio, 0);
migrate_device_unmap()unmaps viatry_to_migrate(folio, 0), deliberately withoutTTU_SPLIT_HUGE_PMD, so every VMA that PMD maps the folio is left holding a PMD sized migration entry. A folio that was PMD mapped in more than one VMA -- afterfork(), for example -- therefore keeps huge migration entries in all the other VMAs while onlymigrate->vmais demoted.
folio_split_unmapped()does not notice: the folio is fully unmapped, so it only looks at the refcount and happily splits to order 0. The other VMAs are then left pointing a huge PMD at an order-0 folio, andmigrate_vma_finalize()->remove_migration_ptes()walks into it:Quoted 11 lines
page dumped because: VM_BUG_ON_FOLIO(folio_test_hugetlb(folio) || !folio_test_pmd_mappable(folio)) kernel BUG at mm/migrate.c:368! RIP: 0010:remove_migration_pte+0x56a/0x9b0 Call Trace: rmap_walk_anon+0xfc/0x260 remove_migration_ptes+0x79/0xb0 __migrate_device_finalize+0x113/0x290 __drm_pagemap_migrate_to_ram+0x278/0x360 [drm_gpusvm_helper] drm_pagemap_migrate_to_ram+0x5c/0x80 [drm_gpusvm_helper] do_huge_pmd_device_private+0x160/0x280Quoted 5 lines
Which is the branch your patchset based on? I found that
drm_pagemap_migrate_populate_ram_pfn()in mm-everything-2026-08-08-07-08 still don't support fallback to single pages if THP allocation fails as in the following comments,Quoted 3 lines
This entire series, on drm-tip (i.e., the 6 patches posted here [1]).
Thanks!
Quoted 185 lines
Quoted 175 lines
/* TODO: Support fallback to single pages if THP allocation fails */Quoted 172 lines
Without
CONFIG_DEBUG_VMtheVM_BUG_ON_FOLIO()is compiled out andremove_migration_pmd()installs a huge PMD pointing at an order-0 page instead, along withadd_mm_counter(mm, MM_ANONPAGES, HPAGE_PMD_NR). The victim mm then maps 2MB of address space onto a single 4K page, which shows up later as bad rss-counter state, leaked page tables and page allocator freelist corruption in unrelated processes.Note this second problem was latent before the refcount fix above: the split always failed, and the failed attempt left
migrate->vmademoted, so the retried fault took the PTE path, where__folio_split()unmaps withTTU_SPLIT_HUGE_PMDand demotes every VMA.Fix it by walking the rmap and demoting every PMD sized migration entry mapping the folio before splitting it. Demote with freeze = false: entry creation in
__split_huge_pmd_locked()is dispatched onpmd_is_migration_entry(), not on freeze, so a migration PMD becomes PTE sized migration entries either way, and freeze only controls a trailingput_page(). With freeze = false there is no refcount change at all, which makes the demotion idempotent across N VMAs.rmap_walk_control.anon_lock is deliberately left unset:
folio_lock_anon_vma_read()depends onfolio_mapped(), and the folio is already fully unmapped here. This mirrorsremove_migration_ptes().Finally, refuse the split for a folio that is not anonymous. The rmap walk would otherwise reach a file backed VMA, where
split_huge_pmd_address()zaps the PMD instead of demoting it.Fixes 4265d67e405a ("mm/migrate_device: add THP splitting during migration")Cc Andrew Morton <[email protected]>Cc David Hildenbrand <[email protected]>Cc Lorenzo Stoakes <[email protected]>Cc Zi Yan <[email protected]>Cc Baolin Wang <[email protected]>Cc Liam R. Howlett <[email protected]>Cc Nico Pache <[email protected]>Cc Ryan Roberts <[email protected]>Cc Dev Jain <[email protected]>Cc Barry Song <[email protected]>Cc Lance Yang <[email protected]>Cc Usama Arif <[email protected]>Cc Joshua Hahn <[email protected]>Cc Rakie Kim <[email protected]>Cc Byungchul Park <[email protected]>Cc Gregory Price <[email protected]>Cc Ying Huang <[email protected]>Cc Alistair Popple <[email protected]>Cc Balbir Singh <[email protected]>Cc Maarten Lankhorst <[email protected]>Cc Maxime Ripard <[email protected]>Cc Thomas Zimmermann <[email protected]>Cc David Airlie <[email protected]>Cc Simona Vetter <[email protected]>Cc Thomas Hellstrm <[email protected]>Cc Francois Dugast <[email protected]>Assisted-by GitHub_Copilot:claude-opus-5Signed-off-by Matthew Brost <[email protected]>--- mm/migrate_device.c | 98 ++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 89 insertions(+), 9 deletions(-)mm/migrate_device.c +84
-5@@ -899,22 +899,104 @@ static int migrate_vma_insert_huge_pmd_page(struct migrate_vma *migrate,return 0 ; } +static bool migrate_vma_split_pmd_one (struct folio *folio, +struct vm_area_struct *vma, +unsigned long addr,void *arg) +{ +DEFINE_FOLIO_VMA_WALK (pvmw, folio, vma, addr,PVMW_SYNC |PVMW_MIGRATION ); + +while (page_vma_mapped_walk (&pvmw)) { +if (pvmw.pte) +continue ; + + addr = pvmw.address; +page_vma_mapped_walk_done (&pvmw); + +/* +* Demote with freeze = false: the PMD already holds a +* migration entry, so __split_huge_pmd_locked() creates PTE +* sized migration entries from it and leaves the refcount +* alone. There is at most one PMD mapping @folio per VMA, so +* stop the walk here. +*/ +split_huge_pmd_address (vma, addr, false); +break ; + } + +return true; +} + +/* +* Demote every PMD sized migration entry that maps @folio to PTE sized ones. +* +* migrate_device_unmap() unmaps with try_to_migrate(folio, 0), i.e. without +* TTU_SPLIT_HUGE_PMD, so a folio that was PMD mapped in several VMAs -- after +* fork(), for instance -- ends up with a PMD sized migration entry in every one +* of them. folio_split_unmapped() below does not care, it only looks at the +* refcount, so splitting the folio without demoting all of those first would +* leave the other VMAs pointing a huge PMD at what is now an order-0 folio. +* remove_migration_ptes() trips over that in migrate_vma_finalize(). +*/ +static void migrate_vma_split_pmd_mappings (struct folio *folio) +{ +struct rmap_walk_control rwc = { + .rmap_one = migrate_vma_split_pmd_one, + }; + +/* +* Do not pass .anon_lock: folio_lock_anon_vma_read() requires +* folio_mapped(), and @folio is already fully unmapped here. +*/ +rmap_walk (folio, &rwc); +} +static int migrate_vma_split_unmapped_folio (struct migrate_vma *migrate, -unsigned long idx,unsigned long addr, +unsigned long idx,struct folio *folio) {unsigned long i;unsigned long pfn;unsigned long flags; +bool fault_folio;int ret =0 ;/* -* take a reference, since split_huge_pmd_address() with freeze = true -* drops a reference at the end. +* migrate_vma_split_pmd_mappings() walks the rmap, and +* split_huge_pmd_address() zaps rather than demotes a PMD in a VMA that +* is not anonymous. migrate_vma_collect_huge_pmd() does not check the +* VMA type, so a file THP can reach here; the rest of the migrate_vma() +* machinery only supports anonymous memory anyway. */ -folio_get (folio); -split_huge_pmd_address (migrate->vma, addr, true); +if (!folio_test_anon (folio)) +return -EINVAL ; + +/* +* A CPU fault on a device private PMD holds an extra reference on the +* folio, taken by do_huge_pmd_device_private(). folio_split_unmapped() +* only tolerates a single caller reference, so the split would always +* fail with -EAGAIN while this fault reference is held. +* +* do_huge_pmd_device_private() derives the fault page from the PMD +* entry, so it is always the head page of @folio, and therefore always +* ends up in the head folio after an uniform split to order 0. Drop +* the reference across the split and re-take it on the head folio +* afterwards, leaving the reference exactly where it is expected to be +* released. +* +* The folio cannot go away while the reference is dropped: the +* reference taken by migrate_vma_collect_huge_pmd() is still held. +*/ + fault_folio = migrate->fault_page && +page_folio (migrate->fault_page) == folio; + +migrate_vma_split_pmd_mappings (folio); + +if (fault_folio) +folio_put (folio);Quoted 9 lines
mm/migrate_device.c static int migrate_vma_insert_huge_pmd_page(struct migrate_vma *migrate, · line 999
Quoted 4 lines
mm/migrate_device.c +3
-0ret =folio_split_unmapped (folio,0 ); +if (fault_folio) +folio_get (folio); +Is it better to pass "
extra_cnt" tofolio_split_unmapped()? This follows the coding style of the other migrate functions better, like that in__migrate_device_pages().Quoted 8 lines
That is an option. To be minimally invasive, I went this route. I also didn't know offhand what would happen if our head page had an extra reference and we then called
folio_split_unmapped()with "extra_cnt", or how that would affect the reference counts of the newly split pages (i.e., whether we would need to adjust the reference counts of all split pages afterfolio_split_unmapped()returns). However, I could quickly reason that dropping the reference and then reacquiring it was functionally correct and safe.Quoted 7 lines
This makes sense for me. Thanks!
I have another question. If we have to split the large folio when migrating from device to ram, should we still migrate all pages of the original large folio, or should we migrate only the faulting normal-sized page of the original large folio instead?
This is a choice made by the upper layers that call the migrate_vma_* functions and populate the
migrate_vmaarguments. In gpusvm/pagemap, we still migrate the entire 2 MB region of memory as 512 4 KB pages upon higher order failure, matching what we did prior to having 2 MB device pages.The reasoning is that migrations are expensive due to the CPU overhead of migrate_vma_* and because GPU copies are issued, requiring larger transfer sizes to achieve the full bandwidth of the bus. For example, a 4 KB copy provides less than 1 GB/s of bandwidth regardless of PCIe speed, whereas a 2 MB copy can nearly reach the theoretical maximum bandwidth of PCIe.
Early in the development of gpusvm/pagemap, I had a knob that forced only single-page 4 KB faults and migrations, along with a test case that measured the fault time in user space for a 2 MB buffer. If I recall correctly, it was about 58 slower than batching 512 4 KB pages together into a single fault and migration on a low-end BMG part.
Quoted 8 lines
Quoted 2 lines
So on higher order page allocation failure, the preference is still do the larger migration.
Got it! Thanks for detailed explanation!
I think that another added complexity is that we need to split the 2MB page table of the GPU side.
That part is somewhat of an independent issue. When memory is moved, we receive an MMU notifier that invalidates the GPU pages. Whenever we rebind, the GPU pages are recreated based on the new memory placement, and GPU pages of the appropriate size are populated. This part is more or less driver- and device-specific.
Matt
Quoted 46 lines
---
Best Regards,
Huang, YingQuoted 42 lines
Matt
Quoted 40 lines
---
Best Regards,
Huang, YingQuoted 36 lines
Matt
Quoted 34 lines
Quoted 21 lines
mm/migrate_device.c +1
-2if (ret)return ret; migrate->src[idx] &= ~MIGRATE_PFN_COMPOUND ;@@ -935,7 +1017,7 @@ static int migrate_vma_insert_huge_pmd_page(struct migrate_vma *migrate, }static int migrate_vma_split_unmapped_folio (struct migrate_vma *migrate, -unsigned long idx,unsigned long addr, +unsigned long idx,struct folio *folio) {return 0 ;@@ -1103,7 +1185,6 @@ static void __migrate_device_pages(unsigned long *src_pfns,struct mmu_notifier_range range;unsigned long i, j;bool notified = false; -unsigned long addr;for (i =0 ; i < npages; ) {struct page *newpage =migrate_pfn_to_page (dst_pfns[i]);mm/migrate_device.c static void __migrate_device_pages(unsigned long *src_pfns, · line 1264
Quoted 9 lines
mm/migrate_device.c +1
-2@@ -1177,8 +1258,7 @@ static void __migrate_device_pages(unsigned long *src_pfns, goto next; } nr =1 <<folio_order (folio); - addr = migrate->start + i *PAGE_SIZE ; -if (migrate_vma_split_unmapped_folio (migrate, i, addr, folio)) { +if (migrate_vma_split_unmapped_folio (migrate, i, folio)) { src_pfns[i] &= ~(MIGRATE_PFN_MIGRATE |MIGRATE_PFN_COMPOUND ); goto next;---
Best Regards,
Huang, Ying
Matthew Brost
maintainerPATCH v3 4/6 drm/pagemap: dma-unmap pages before handling migration errors
In reply to Matthew Brostdrm_pagemap_migrate_unmap_pages() relies on the pages array to determine which pages require DMA unmapping. However, drm_pagemap_migration_unlock_put_pages() clears the array as part of its cleanup, leaving drm_pagemap_migrate_unmap_pages() with no valid page information if it is called afterward.
Call drm_pagemap_migrate_unmap_pages() before drm_pagemap_migration_unlock_put_pages() so the pages array remains valid during DMA unmapping.
--- drivers/gpu/drm/drm_pagemap.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)
drivers/gpu/drm/drm_pagemap.c +6 -6
@@ -1175,12 +1175,12 @@ int drm_pagemap_evict_to_ram(struct drm_pagemap_devmem *devmem_allocation) goto err_finalize; err_finalize: +drm_pagemap_migrate_unmap_pages (devmem_allocation->dev, pagemap_addr, dst, npages, +DMA_FROM_DEVICE , &state);if (err)drm_pagemap_migration_unlock_put_pages (npages, dst);migrate_device_pages (src, dst, npages);migrate_device_finalize (src, dst, npages); -drm_pagemap_migrate_unmap_pages (devmem_allocation->dev, pagemap_addr, dst, npages, -DMA_FROM_DEVICE , &state); err_free:kvfree (buf);
@@ -1305,14 +1305,14 @@ static int __drm_pagemap_migrate_to_ram(struct vm_area_struct *vas, goto err_finalize; err_finalize: -if (err) -drm_pagemap_migration_unlock_put_pages (npages, migrate.dst); -migrate_vma_pages (&migrate); -migrate_vma_finalize (&migrate);if (dev)drm_pagemap_migrate_unmap_pages (dev, pagemap_addr, migrate.dst, npages,DMA_FROM_DEVICE , &state); +if (err) +drm_pagemap_migration_unlock_put_pages (npages, migrate.dst); +migrate_vma_pages (&migrate); +migrate_vma_finalize (&migrate); err_free:kvfree (buf); err_out:
Signature · 1 line
2.34.1
[email protected]
AI reviewRe: [PATCH v3 4/6] drm/pagemap: dma-unmap pages before handling migration errors
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
Pre-existing issues:
- [Critical] Valid DMA address 0 is leaked because drm_pagemap_migrate_unmap_pages skips unmapping when pagemap_addr[i].addr == 0, leading to a stale IOMMU mapping and potential use-after-free. --
--- Patch [4]: [PATCH v3 4/6] drm/pagemap: dma-unmap pages before handling migration errors --- commit 449a54e82e1a7fd00fc19c70ae34414088711db1
Author: Matthew Brost <[email protected]>
drm/pagemap: dma-unmap pages before handling migration errors
This commit reorders the cleanup sequence during migration errors. It ensures that DMA unmapping occurs before the pages array is cleared, preventing missing unmaps due to invalid page information.
drivers/gpu/drm/drm_pagemap.c int drm_pagemap_evict_to_ram(struct drm_pagemap_devmem *devmem_allocation) · line 1179
Quoted 10 lines
drivers/gpu/drm/drm_pagemap.c +2
-0@@ -1175,12 +1175,12 @@ int drm_pagemap_evict_to_ram(struct drm_pagemap_devmem *devmem_allocation) goto err_finalize; err_finalize: +drm_pagemap_migrate_unmap_pages (devmem_allocation->dev, pagemap_addr, dst, npages, +DMA_FROM_DEVICE , &state);
[Severity: Critical]
This is a pre-existing issue, but does the check inside drm_pagemap_migrate_unmap_pages() accidentally leak valid DMA address 0?
drivers/gpu/drm/drm_pagemap.c:drm_pagemap_migrate_unmap_pages() {
...
if (!page || !pagemap_addr[i].addr || dma_mapping_error(dev, pagemap_addr[i].addr))
goto next;
...
}Since 0 is a valid DMA address on many platforms, skipping the unmap when pagemap_addr[i].addr == 0 might leave a stale IOMMU mapping.
When the page is subsequently freed, could a malicious userspace instruct the GPU to access this DMA address and cause memory corruption or an IOMMU use-after-free?
Quoted 9 lines
drivers/gpu/drm/drm_pagemap.c +0
-2if (err)drm_pagemap_migration_unlock_put_pages (npages, dst);migrate_device_pages (src, dst, npages);migrate_device_finalize (src, dst, npages); -drm_pagemap_migrate_unmap_pages (devmem_allocation->dev, pagemap_addr, dst, npages, -DMA_FROM_DEVICE , &state); err_free:kvfree (buf);
Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=4
Re: [PATCH v3 4/6] drm/pagemap: dma-unmap pages before handling migration errors
In reply to Matthew BrostQuoted 72 lines · Matthew Brost
drm_pagemap_migrate_unmap_pages()relies on the pages array to determine which pages require DMA unmapping. However,drm_pagemap_migration_unlock_put_pages()clears the array as part of its cleanup, leavingdrm_pagemap_migrate_unmap_pages()with no valid page information if it is called afterward.Call
drm_pagemap_migrate_unmap_pages()beforedrm_pagemap_migration_unlock_put_pages()so the pages array remains valid during DMA unmapping.Reported-by Sashiko <[email protected]>Fixes f86ad0ed620c ("drm/gpusvm, drm/pagemap: Move migration functionality to drm_pagemap")Cc Andrew Morton <[email protected]>Cc David Hildenbrand <[email protected]>Cc Lorenzo Stoakes <[email protected]>Cc Zi Yan <[email protected]>Cc Baolin Wang <[email protected]>Cc Liam R. Howlett <[email protected]>Cc Nico Pache <[email protected]>Cc Ryan Roberts <[email protected]>Cc Dev Jain <[email protected]>Cc Barry Song <[email protected]>Cc Lance Yang <[email protected]>Cc Usama Arif <[email protected]>Cc Joshua Hahn <[email protected]>Cc Rakie Kim <[email protected]>Cc Byungchul Park <[email protected]>Cc Gregory Price <[email protected]>Cc Ying Huang <[email protected]>Cc Alistair Popple <[email protected]>Cc Balbir Singh <[email protected]>Cc Maarten Lankhorst <[email protected]>Cc Maxime Ripard <[email protected]>Cc Thomas Zimmermann <[email protected]>Cc David Airlie <[email protected]>Cc Simona Vetter <[email protected]>Cc Thomas Hellström <[email protected]>Cc Francois Dugast <[email protected]>Signed-off-by Matthew Brost <[email protected]>--- drivers/gpu/drm/drm_pagemap.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)drivers/gpu/drm/drm_pagemap.c +2
-4@@ -1175,12 +1175,12 @@ int drm_pagemap_evict_to_ram(struct drm_pagemap_devmem *devmem_allocation) goto err_finalize; err_finalize: +drm_pagemap_migrate_unmap_pages (devmem_allocation->dev, pagemap_addr, dst, npages, +DMA_FROM_DEVICE , &state);if (err)drm_pagemap_migration_unlock_put_pages (npages, dst);migrate_device_pages (src, dst, npages);migrate_device_finalize (src, dst, npages); -drm_pagemap_migrate_unmap_pages (devmem_allocation->dev, pagemap_addr, dst, npages, -DMA_FROM_DEVICE , &state); err_free:kvfree (buf);@@ -1305,14 +1305,14 @@ static int __drm_pagemap_migrate_to_ram(struct vm_area_struct *vas, goto err_finalize; err_finalize: -if (err) -drm_pagemap_migration_unlock_put_pages (npages, migrate.dst);
drivers/gpu/drm/drm_pagemap.c static int __drm_pagemap_migrate_to_ram(struct vm_area_struct *vas, · line 1315
Quoted 10 lines
drivers/gpu/drm/drm_pagemap.c +4
-2-migrate_vma_pages (&migrate); -migrate_vma_finalize (&migrate);if (dev)drm_pagemap_migrate_unmap_pages (dev, pagemap_addr, migrate.dst, npages,DMA_FROM_DEVICE , &state); +if (err) +drm_pagemap_migration_unlock_put_pages (npages, migrate.dst); +migrate_vma_pages (&migrate); +migrate_vma_finalize (&migrate);
LGTM
Quoted 3 lines
drivers/gpu/drm/drm_pagemap.c +0
-0err_free:kvfree (buf); err_out:
Matthew Brost
maintainerPATCH v3 5/6 drm/pagemap: Fix folio allocation fallback and use-after-put
In reply to Matthew Brostdrm_pagemap_migrate_populate_ram_pfn() had two issues when populating RAM PFNs with higher-order folios:
1. The higher-order vma_alloc_folio()/folio_alloc() calls did not pass __GFP_NOWARN, so a THP allocation failure under memory pressure would spam the kernel log, and there was no fallback path despite a TODO comment stating one was needed. Add __GFP_NOWARN to the higher-order allocation and, on failure, fall back to order-0 allocations for the entire range originally covered by the failed higher-order allocation, leaving MIGRATE_PFN_COMPOUND unset for those PFNs.
2. In the free_pages error path, order was computed via folio_order(page_folio(page)) *after* put_page(page) had already dropped the reference, resulting in a use-after-free/put when that was the last reference on the page. Compute order before releasing the page.
Introducing the fallback in 1. also requires the source page array handed to ->copy_to_ram() to be built differently. Both callers only populated the entry at the head of each source folio, relying on the copy callback to derive the rest of the folio from the order recorded in the matching drm_pagemap_addr. Once the destination has been demoted to order-0 folios the drm_pagemap_addr entries are per-page, so a source page is needed for every one of them; leaving them NULL makes the copy callback stop after the first page and the remainder of the range is never copied.
The source folio is only split later, by migrate_vma_pages() / migrate_device_pages(), so its order cannot be used to detect the demotion - test the destination for MIGRATE_PFN_COMPOUND instead. Factor the array population out into drm_pagemap_migrate_populate_src_pages() and use it from both drm_pagemap_evict_to_ram() and __drm_pagemap_migrate_to_ram().
---
v2: Add THP-mid-PMD invariant (Sashiko)
--- drivers/gpu/drm/drm_pagemap.c | 128 +++++++++++++++++++++++++++------- 1 file changed, 103 insertions(+), 25 deletions(-)
drivers/gpu/drm/drm_pagemap.c +103 -25
@@ -383,6 +383,58 @@ drm_pagemap_migrate_map_system_pages(struct device *dev,return 0 ; } +/** +* drm_pagemap_migrate_populate_src_pages() - Populate the source page array +* @pages: Array of source pages to populate +* @src_mpfn: Source array of migrate PFNs +* @dst_mpfn: Destination array of migrate PFNs +* @npages: Number of pages in the arrays +* +* Populate @pages with the device pages the copy callback is to read from. +* +* Entries are normally only populated at the head of each source folio, with +* the copy callback deriving the rest of the folio from the order recorded in +* the corresponding drm_pagemap_addr. That does not work where +* drm_pagemap_migrate_populate_ram_pfn() had to demote a higher-order source +* folio to order-0 destination folios: the drm_pagemap_addr entries are then +* per-page, and the copy callback needs a source page for each of them. +* Populate every entry for those ranges. +* +* Note that the source folio itself is only split later, by +* migrate_vma_pages() / migrate_device_pages(), so its order cannot be used to +* detect the demotion - the destination has to be inspected instead. +*/ +static void drm_pagemap_migrate_populate_src_pages (struct page **pages, +unsigned long *src_mpfn, +unsigned long *dst_mpfn, +unsigned long npages) +{ +unsigned long i; + +for (i =0 ; i < npages;) { +struct page *page =migrate_pfn_to_page (src_mpfn[i]); +unsigned int order =0 ; +unsigned long j, nr; + +if (!page) { + i++; +continue ; + } + + order =folio_order (page_folio (page)); + nr =NR_PAGES (order); + +if (order && !(dst_mpfn[i] &MIGRATE_PFN_COMPOUND )) { +for (j =0 ; j < nr && i + j < npages; j++) + pages[i + j] =folio_page (page_folio (page), j); + }else { + pages[i] = page; + } + + i += nr; + } +} +/** * drm_pagemap_migrate_unmap_pages() - Unmap pages previously mapped for GPU SVM migration * @dev: The device for which the pages were mapped
@@ -875,6 +927,7 @@ static int drm_pagemap_migrate_populate_ram_pfn(struct vm_area_struct *vas,struct page *page =NULL , *src_page;struct folio *folio;unsigned int order =0 ; +gfp_t gfp =GFP_HIGHUSER ;if (!(src_mpfn[i] &MIGRATE_PFN_MIGRATE )) goto next;
@@ -891,11 +944,51 @@ static int drm_pagemap_migrate_populate_ram_pfn(struct vm_area_struct *vas, order =folio_order (page_folio (src_page)); -/* TODO: Support fallback to single pages if THP allocation fails */ +/* +* A large source folio is always collected whole, at its head +* page, PMD aligned and flagged MIGRATE_PFN_COMPOUND: anything +* else is split before it reaches us, either by +* migrate_vma_collect_pmd() or, for the eviction path, by +* migrate_device_pfns(). Both the order-0 fallback below and +* drm_pagemap_migrate_populate_src_pages() rely on that, as +* they index the folio from @i. +*/ +WARN_ON_ONCE (order && + (src_page !=folio_page (page_folio (src_page),0 ) || + !(src_mpfn[i] &MIGRATE_PFN_COMPOUND ))); + +if (order) + gfp |= __GFP_NOWARN; +if (vas) - folio =vma_alloc_folio (GFP_HIGHUSER , order, vas, addr); + folio =vma_alloc_folio (gfp, order, vas, addr);else - folio =folio_alloc (GFP_HIGHUSER , order); + folio =folio_alloc (gfp, order); + +if (!folio && order) { +/* +* Higher-order allocation failed, fall back to +* order-0 allocations for the entire range covered +* by the original higher-order allocation, without +* setting MIGRATE_PFN_COMPOUND, until we move past +* that range. +*/ +unsigned long nr =NR_PAGES (order); +unsigned long j; + + gfp &= ~__GFP_NOWARN; +for (j =0 ; j < nr && i < npages; j++, i++, addr +=PAGE_SIZE ) { + folio = vas ? +vma_alloc_folio (gfp,0 , vas, addr) : +folio_alloc (gfp,0 ); +if (!folio) + goto free_pages; + + page =folio_page (folio,0 ); + mpfn[i] =migrate_pfn (page_to_pfn (page)); + } +continue ; + }if (!folio) goto free_pages;
@@ -940,11 +1033,11 @@ static int drm_pagemap_migrate_populate_ram_pfn(struct vm_area_struct *vas,if (!page) goto next_put; + order =folio_order (page_folio (page)); +put_page (page); mpfn[i] =0 ; - order =folio_order (page_folio (page)); - next_put: i +=NR_PAGES (order); }
@@ -1120,7 +1213,7 @@ int drm_pagemap_evict_to_ram(struct drm_pagemap_devmem *devmem_allocation)unsigned long *src, *dst;struct drm_pagemap_addr *pagemap_addr;void *buf; -int i, err =0 ; +int err =0 ;unsigned int retry_count =2 ; npages = devmem_allocation->size >>PAGE_SHIFT ;
@@ -1160,15 +1253,7 @@ int drm_pagemap_evict_to_ram(struct drm_pagemap_devmem *devmem_allocation)if (err) goto err_finalize; -for (i =0 ; i < npages;) { -unsigned int order =0 ; - - pages[i] =migrate_pfn_to_page (src[i]); -if (pages[i]) - order =folio_order (page_folio (pages[i])); - - i +=NR_PAGES (order); - } +drm_pagemap_migrate_populate_src_pages (pages, src, dst, npages); err = ops->copy_to_ram (pages, pagemap_addr, npages,NULL );if (err)
@@ -1235,7 +1320,7 @@ static int __drm_pagemap_migrate_to_ram(struct vm_area_struct *vas,struct drm_pagemap_addr *pagemap_addr;unsigned long start, end;void *buf; -int i, err =0 ; +int err =0 ; zdd =drm_pagemap_page_zone_device_data (page);if (time_before64 (get_jiffies_64 (), zdd->devmem_allocation->timeslice_expiration))
@@ -1290,15 +1375,8 @@ static int __drm_pagemap_migrate_to_ram(struct vm_area_struct *vas,if (err) goto err_finalize; -for (i =0 ; i < npages;) { -unsigned int order =0 ; - - pages[i] =migrate_pfn_to_page (migrate.src[i]); -if (pages[i]) - order =folio_order (page_folio (pages[i])); - - i +=NR_PAGES (order); - } +drm_pagemap_migrate_populate_src_pages (pages, migrate.src, migrate.dst, + npages); err = ops->copy_to_ram (pages, pagemap_addr, npages,NULL );if (err)
Signature · 1 line
2.34.1
Re: [PATCH v3 5/6] drm/pagemap: Fix folio allocation fallback and use-after-put
Quoted 255 lines · Matthew Brost
drm_pagemap_migrate_populate_ram_pfn()had two issues when populating RAM PFNs with higher-order folios:1. The higher-order vma_alloc_folio()/folio_alloc() calls did not pass
__GFP_NOWARN, so a THP allocation failure under memory pressure would spam the kernel log, and there was no fallback path despite a TODO comment stating one was needed. Add__GFP_NOWARNto the higher-order allocation and, on failure, fall back to order-0 allocations for the entire range originally covered by the failed higher-order allocation, leavingMIGRATE_PFN_COMPOUNDunset for those PFNs.2. In the
free_pageserror path, order was computed via folio_order(page_folio(page)) *after*put_page(page)had already dropped the reference, resulting in a use-after-free/put when that was the last reference on the page. Compute order before releasing the page.Introducing the fallback in 1. also requires the source page array handed to ->copy_to_ram() to be built differently. Both callers only populated the entry at the head of each source folio, relying on the copy callback to derive the rest of the folio from the order recorded in the matching
drm_pagemap_addr. Once the destination has been demoted to order-0 folios thedrm_pagemap_addrentries are per-page, so a source page is needed for every one of them; leaving them NULL makes the copy callback stop after the first page and the remainder of the range is never copied.The source folio is only split later, by
migrate_vma_pages()/migrate_device_pages(), so its order cannot be used to detect the demotion - test the destination forMIGRATE_PFN_COMPOUNDinstead. Factor the array population out intodrm_pagemap_migrate_populate_src_pages()and use it from bothdrm_pagemap_evict_to_ram()and__drm_pagemap_migrate_to_ram().Fixes ddeda6136038 ("drm/pagemap: Allocate folios when possible")Cc Andrew Morton <[email protected]>Cc David Hildenbrand <[email protected]>Cc Lorenzo Stoakes <[email protected]>Cc Zi Yan <[email protected]>Cc Baolin Wang <[email protected]>Cc Liam R. Howlett <[email protected]>Cc Nico Pache <[email protected]>Cc Ryan Roberts <[email protected]>Cc Dev Jain <[email protected]>Cc Barry Song <[email protected]>Cc Lance Yang <[email protected]>Cc Usama Arif <[email protected]>Cc Joshua Hahn <[email protected]>Cc Rakie Kim <[email protected]>Cc Byungchul Park <[email protected]>Cc Gregory Price <[email protected]>Cc Ying Huang <[email protected]>Cc Alistair Popple <[email protected]>Cc Balbir Singh <[email protected]>Cc Maarten Lankhorst <[email protected]>Cc Maxime Ripard <[email protected]>Cc Thomas Zimmermann <[email protected]>Cc David Airlie <[email protected]>Cc Simona Vetter <[email protected]>Cc Thomas Hellström <[email protected]>Cc Francois Dugast <[email protected]>Assisted-by GitHub_Copilot:claude-opus-5Signed-off-by Matthew Brost <[email protected]>---
v2: Add THP-mid-PMD invariant (Sashiko)--- drivers/gpu/drm/drm_pagemap.c | 128 +++++++++++++++++++++++++++------- 1 file changed, 103 insertions(+), 25 deletions(-)drivers/gpu/drm/drm_pagemap.c +101
-17@@ -383,6 +383,58 @@ drm_pagemap_migrate_map_system_pages(struct device *dev,return 0 ; } +/** +* drm_pagemap_migrate_populate_src_pages() - Populate the source page array +* @pages: Array of source pages to populate +* @src_mpfn: Source array of migrate PFNs +* @dst_mpfn: Destination array of migrate PFNs +* @npages: Number of pages in the arrays +* +* Populate @pages with the device pages the copy callback is to read from. +* +* Entries are normally only populated at the head of each source folio, with +* the copy callback deriving the rest of the folio from the order recorded in +* the corresponding drm_pagemap_addr. That does not work where +* drm_pagemap_migrate_populate_ram_pfn() had to demote a higher-order source +* folio to order-0 destination folios: the drm_pagemap_addr entries are then +* per-page, and the copy callback needs a source page for each of them. +* Populate every entry for those ranges. +* +* Note that the source folio itself is only split later, by +* migrate_vma_pages() / migrate_device_pages(), so its order cannot be used to +* detect the demotion - the destination has to be inspected instead. +*/ +static void drm_pagemap_migrate_populate_src_pages (struct page **pages, +unsigned long *src_mpfn, +unsigned long *dst_mpfn, +unsigned long npages) +{ +unsigned long i; + +for (i =0 ; i < npages;) { +struct page *page =migrate_pfn_to_page (src_mpfn[i]); +unsigned int order =0 ; +unsigned long j, nr; + +if (!page) { + i++; +continue ; + } + + order =folio_order (page_folio (page)); + nr =NR_PAGES (order); + +if (order && !(dst_mpfn[i] &MIGRATE_PFN_COMPOUND )) { +for (j =0 ; j < nr && i + j < npages; j++) + pages[i + j] =folio_page (page_folio (page), j); + }else { + pages[i] = page; + } + + i += nr; + } +} +/** * drm_pagemap_migrate_unmap_pages() - Unmap pages previously mapped for GPU SVM migration * @dev: The device for which the pages were mapped @@ -875,6 +927,7 @@ static int drm_pagemap_migrate_populate_ram_pfn(struct vm_area_struct *vas,struct page *page =NULL , *src_page;struct folio *folio;unsigned int order =0 ; +gfp_t gfp =GFP_HIGHUSER ;if (!(src_mpfn[i] &MIGRATE_PFN_MIGRATE )) goto next;@@ -891,11 +944,51 @@ static int drm_pagemap_migrate_populate_ram_pfn(struct vm_area_struct *vas, order =folio_order (page_folio (src_page)); -/* TODO: Support fallback to single pages if THP allocation fails */ +/* +* A large source folio is always collected whole, at its head +* page, PMD aligned and flagged MIGRATE_PFN_COMPOUND: anything +* else is split before it reaches us, either by +* migrate_vma_collect_pmd() or, for the eviction path, by +* migrate_device_pfns(). Both the order-0 fallback below and +* drm_pagemap_migrate_populate_src_pages() rely on that, as +* they index the folio from @i. +*/ +WARN_ON_ONCE (order && + (src_page !=folio_page (page_folio (src_page),0 ) || + !(src_mpfn[i] &MIGRATE_PFN_COMPOUND ))); + +if (order) + gfp |= __GFP_NOWARN; +if (vas) - folio =vma_alloc_folio (GFP_HIGHUSER , order, vas, addr); + folio =vma_alloc_folio (gfp, order, vas, addr);else - folio =folio_alloc (GFP_HIGHUSER , order); + folio =folio_alloc (gfp, order); + +if (!folio && order) { +/* +* Higher-order allocation failed, fall back to +* order-0 allocations for the entire range covered +* by the original higher-order allocation, without +* setting MIGRATE_PFN_COMPOUND, until we move past +* that range. +*/ +unsigned long nr =NR_PAGES (order); +unsigned long j; + + gfp &= ~__GFP_NOWARN; +for (j =0 ; j < nr && i < npages; j++, i++, addr +=PAGE_SIZE ) { + folio = vas ? +vma_alloc_folio (gfp,0 , vas, addr) : +folio_alloc (gfp,0 ); +if (!folio) + goto free_pages; + + page =folio_page (folio,0 ); + mpfn[i] =migrate_pfn (page_to_pfn (page)); + } +continue ; + }if (!folio) goto free_pages;@@ -940,11 +1033,11 @@ static int drm_pagemap_migrate_populate_ram_pfn(struct vm_area_struct *vas,if (!page) goto next_put; + order =folio_order (page_folio (page)); +put_page (page); mpfn[i] =0 ; - order =folio_order (page_folio (page)); - next_put: i +=NR_PAGES (order); }@@ -1120,7 +1213,7 @@ int drm_pagemap_evict_to_ram(struct drm_pagemap_devmem *devmem_allocation)unsigned long *src, *dst;struct drm_pagemap_addr *pagemap_addr;void *buf; -int i, err =0 ; +int err =0 ;unsigned int retry_count =2 ; npages = devmem_allocation->size >>PAGE_SHIFT ;@@ -1160,15 +1253,7 @@ int drm_pagemap_evict_to_ram(struct drm_pagemap_devmem *devmem_allocation)if (err) goto err_finalize; -for (i =0 ; i < npages;) { -unsigned int order =0 ; - - pages[i] =migrate_pfn_to_page (src[i]); -if (pages[i]) - order =folio_order (page_folio (pages[i])); - - i +=NR_PAGES (order); - } +drm_pagemap_migrate_populate_src_pages (pages, src, dst, npages); err = ops->copy_to_ram (pages, pagemap_addr, npages,NULL );if (err)@@ -1235,7 +1320,7 @@ static int __drm_pagemap_migrate_to_ram(struct vm_area_struct *vas,struct drm_pagemap_addr *pagemap_addr;unsigned long start, end;void *buf; -int i, err =0 ; +int err =0 ; zdd =drm_pagemap_page_zone_device_data (page);if (time_before64 (get_jiffies_64 (), zdd->devmem_allocation->timeslice_expiration))@@ -1290,15 +1375,8 @@ static int __drm_pagemap_migrate_to_ram(struct vm_area_struct *vas,if (err) goto err_finalize; -for (i =0 ; i < npages;) {
drivers/gpu/drm/drm_pagemap.c static int __drm_pagemap_migrate_to_ram(struct vm_area_struct *vas, · line 1379
Quoted 10 lines
drivers/gpu/drm/drm_pagemap.c +2
-8-unsigned int order =0 ; - - pages[i] =migrate_pfn_to_page (migrate.src[i]); -if (pages[i]) - order =folio_order (page_folio (pages[i])); - - i +=NR_PAGES (order); - } + drm_pagemap_migrate_populate_src_pages(pages, migrate.src, migrate.dst, +
LGTM
npages);
Quoted 3 lines
drivers/gpu/drm/drm_pagemap.c +0
-0err = ops->copy_to_ram (pages, pagemap_addr, npages,NULL );if (err)
Matthew Brost
maintainerPATCH v3 6/6 drm/pagemap: Add fault injection for higher-order RAM folio allocation
In reply to Matthew BrostMigrating a device-private THP back to system memory has two distinct paths in __migrate_device_pages(): the fast path where both source and destination carry MIGRATE_PFN_COMPOUND, and the fallback path where the destination could only be satisfied with order-0 folios and the source THP therefore has to be split via migrate_vma_split_unmapped_folio().
The fallback path only triggers under genuine memory pressure, which makes it both rare and awkward to reproduce, yet it is the path where the interesting refcounting happens (the CPU fault holds an extra reference on the device folio taken by do_huge_pmd_device_private()).
Add a fault_attr, modelled on backup_fault_inject in ttm_pool.c, that forces the higher-order allocation in drm_pagemap_migrate_populate_ram_pfn() to fail so the existing order-0 fallback is taken deterministically.
The attribute is exposed at /sys/kernel/debug/drm_pagemap_fault_inject and requires CONFIG_FAULT_INJECTION_DEBUG_FS. With CONFIG_FAULT_INJECTION disabled the helper compiles out to a constant false and the injection has no cost.
--- drivers/gpu/drm/drm_pagemap.c | 36 ++++++++++++++++++++++++++++++++++- 1 file changed, 35 insertions(+), 1 deletion(-)
drivers/gpu/drm/drm_pagemap.c +35 -1
@@ -3,6 +3,7 @@* Copyright © 2024-2025 Intel Corporation */ +#include <linux/debugfs.h> #include <linux/dma-fence.h> #include <linux/dma-mapping.h> #include <linux/migrate.h>
@@ -12,6 +13,27 @@#include <drm/drm_pagemap_util.h> #include <drm/drm_print.h> +#ifdef CONFIG_FAULT_INJECTION +#include <linux/fault-inject.h> +static DECLARE_FAULT_ATTR (migrate_to_ram_fault_inject); + +/* +* Force a higher-order destination folio allocation to fail in +* drm_pagemap_migrate_populate_ram_pfn(), exercising the order-0 fallback +* (and, in turn, the THP split path in __migrate_device_pages()) without +* having to drive the system into actual memory pressure. +*/ +static bool drm_pagemap_fault_inject_folio (void ) +{ +return should_fail (&migrate_to_ram_fault_inject,1 ); +} +#else +static bool drm_pagemap_fault_inject_folio (void ) +{ +return false; +} +#endif +/** * DOC: Overview *
@@ -960,7 +982,9 @@ static int drm_pagemap_migrate_populate_ram_pfn(struct vm_area_struct *vas,if (order) gfp |= __GFP_NOWARN; -if (vas) +if (order &&drm_pagemap_fault_inject_folio ()) + folio =NULL ; +else if (vas) folio =vma_alloc_folio (gfp, order, vas, addr);else folio =folio_alloc (gfp, order);
@@ -1554,6 +1578,16 @@ void drm_pagemap_destroy(struct drm_pagemap *dpagemap, bool is_atomic_or_reclaimkfree (dpagemap); } +static int __init drm_pagemap_module_init (void ) +{ +#if defined(CONFIG_DEBUG_FS ) && defined(CONFIG_FAULT_INJECTION ) +fault_create_debugfs_attr ("drm_pagemap_fault_inject" ,NULL , + &migrate_to_ram_fault_inject); +#endif +return 0 ; +} +module_init (drm_pagemap_module_init); +static void drm_pagemap_exit (void ) {flush_work (&drm_pagemap_work);
Signature · 1 line
2.34.1
[email protected]
AI reviewRe: [PATCH v3 6/6] drm/pagemap: Add fault injection for higher-order RAM folio allocation
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider: - [High] Use-After-Free in debugfs due to missing cleanup on module unload. --
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [High] Use-After-Free in debugfs due to missing cleanup on module unload. --
--- Patch [6]: [PATCH v3 6/6] drm/pagemap: Add fault injection for higher-order RAM folio allocation --- commit fdb5d198639794ed363bbe0eda839a0e39a16e0c
Author: Matthew Brost <[email protected]>
drm/pagemap: Add fault injection for higher-order RAM folio allocation
This commit introduces a fault injection attribute to simulate memory pressure for higher-order RAM folio allocations. It adds a debugfs entry to allow testing the order-0 fallback and THP split paths in __migrate_device_pages().
Quoted 3 lines
drivers/gpu/drm/drm_pagemap.c +0
-0
[ ... ]
Quoted 17 lines
drivers/gpu/drm/drm_pagemap.c +10
-0@@ -1554,6 +1578,16 @@ void drm_pagemap_destroy(struct drm_pagemap *dpagemap, bool is_atomic_or_reclaimkfree (dpagemap); } +static int __init drm_pagemap_module_init (void ) +{ +#if defined(CONFIG_DEBUG_FS ) && defined(CONFIG_FAULT_INJECTION ) +fault_create_debugfs_attr ("drm_pagemap_fault_inject" ,NULL , + &migrate_to_ram_fault_inject); +#endif +return 0 ; +} +module_init (drm_pagemap_module_init); +static void drm_pagemap_exit (void ) {flush_work (&drm_pagemap_work);
drivers/gpu/drm/drm_pagemap.c
Quoted 3 lines
drivers/gpu/drm/drm_pagemap.c +0
-0if (WARN_ON (!llist_empty (&drm_pagemap_unhold_list)))disable_work_sync (&drm_pagemap_work); }
[Severity: High]
Does this leak the debugfs directory on module unload, potentially leading to a use-after-free?
In drm_pagemap_module_init(), fault_create_debugfs_attr() creates a debugfs entry pointing to migrate_to_ram_fault_inject, which resides in the module's memory. Since the returned dentry isn't saved and removed here in drm_pagemap_exit(), the debugfs entry will remain active after the module is unloaded.
If the debugfs files are accessed post-unload, could the kernel dereference the freed fault_attr pointer? Should the dentry be captured during init and cleaned up in the exit function?
Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=6
Ghimiray, Himal Prasad
reviewerRe: [PATCH v3 6/6] drm/pagemap: Add fault injection for higher-order RAM folio allocation
In reply to Matthew BrostQuoted 113 lines · Matthew Brost
Migrating a device-private THP back to system memory has two distinct paths in
__migrate_device_pages(): the fast path where both source and destination carryMIGRATE_PFN_COMPOUND, and the fallback path where the destination could only be satisfied with order-0 folios and the source THP therefore has to be split viamigrate_vma_split_unmapped_folio().The fallback path only triggers under genuine memory pressure, which makes it both rare and awkward to reproduce, yet it is the path where the interesting refcounting happens (the CPU fault holds an extra reference on the device folio taken by
do_huge_pmd_device_private()).Add a
fault_attr, modelled onbackup_fault_injectinttm_pool.c, that forces the higher-order allocation indrm_pagemap_migrate_populate_ram_pfn()to fail so the existing order-0 fallback is taken deterministically.The attribute is exposed at
/sys/kernel/debug/drm_pagemap_fault_injectand requiresCONFIG_FAULT_INJECTION_DEBUG_FS. WithCONFIG_FAULT_INJECTIONdisabled the helper compiles out to a constant false and the injection has no cost.Cc Andrew Morton <[email protected]>Cc David Hildenbrand <[email protected]>Cc Lorenzo Stoakes <[email protected]>Cc Zi Yan <[email protected]>Cc Baolin Wang <[email protected]>Cc Liam R. Howlett <[email protected]>Cc Nico Pache <[email protected]>Cc Ryan Roberts <[email protected]>Cc Dev Jain <[email protected]>Cc Barry Song <[email protected]>Cc Lance Yang <[email protected]>Cc Usama Arif <[email protected]>Cc Joshua Hahn <[email protected]>Cc Rakie Kim <[email protected]>Cc Byungchul Park <[email protected]>Cc Gregory Price <[email protected]>Cc Ying Huang <[email protected]>Cc Alistair Popple <[email protected]>Cc Balbir Singh <[email protected]>Cc Maarten Lankhorst <[email protected]>Cc Maxime Ripard <[email protected]>Cc Thomas Zimmermann <[email protected]>Cc David Airlie <[email protected]>Cc Simona Vetter <[email protected]>Cc Thomas Hellström <[email protected]>Cc Francois Dugast <[email protected]>Assisted-by GitHub_Copilot:claude-opus-5Signed-off-by Matthew Brost <[email protected]>--- drivers/gpu/drm/drm_pagemap.c | 36 ++++++++++++++++++++++++++++++++++- 1 file changed, 35 insertions(+), 1 deletion(-)drivers/gpu/drm/drm_pagemap.c +27
-1@@ -3,6 +3,7 @@* Copyright © 2024-2025 Intel Corporation */ +#include <linux/debugfs.h> #include <linux/dma-fence.h> #include <linux/dma-mapping.h> #include <linux/migrate.h> @@ -12,6 +13,27 @@#include <drm/drm_pagemap_util.h> #include <drm/drm_print.h> +#ifdef CONFIG_FAULT_INJECTION +#include <linux/fault-inject.h> +static DECLARE_FAULT_ATTR (migrate_to_ram_fault_inject); + +/* +* Force a higher-order destination folio allocation to fail in +* drm_pagemap_migrate_populate_ram_pfn(), exercising the order-0 fallback +* (and, in turn, the THP split path in __migrate_device_pages()) without +* having to drive the system into actual memory pressure. +*/ +static bool drm_pagemap_fault_inject_folio (void ) +{ +return should_fail (&migrate_to_ram_fault_inject,1 ); +} +#else +static bool drm_pagemap_fault_inject_folio (void ) +{ +return false; +} +#endif +/** * DOC: Overview * @@ -960,7 +982,9 @@ static int drm_pagemap_migrate_populate_ram_pfn(struct vm_area_struct *vas,if (order) gfp |= __GFP_NOWARN; -if (vas) +if (order &&drm_pagemap_fault_inject_folio ()) + folio =NULL ; +else if (vas) folio =vma_alloc_folio (gfp, order, vas, addr);else folio =folio_alloc (gfp, order);@@ -1554,6 +1578,16 @@ void drm_pagemap_destroy(struct drm_pagemap *dpagemap, bool is_atomic_or_reclaimkfree (dpagemap); } +static int __init drm_pagemap_module_init (void ) +{
drivers/gpu/drm/drm_pagemap.c void drm_pagemap_destroy(struct drm_pagemap *dpagemap, bool is_atomic_or_reclaim · line 1592
Quoted 10 lines
drivers/gpu/drm/drm_pagemap.c +8
-0+#if defined(CONFIG_DEBUG_FS ) && defined(CONFIG_FAULT_INJECTION ) +fault_create_debugfs_attr ("drm_pagemap_fault_inject" ,NULL , + &migrate_to_ram_fault_inject); +#endif +return 0 ; +} +module_init (drm_pagemap_module_init); +static void drm_pagemap_exit (void ) {
Missed fault injection debugfs removal ?
Sashiko flags it and looks valid concern.
Quoted 1 line
drivers/gpu/drm/drm_pagemap.c +0
-0flush_work (&drm_pagemap_work);
Matthew Brost
maintainerRe: [PATCH v3 6/6] drm/pagemap: Add fault injection for higher-order RAM folio allocation
Quoted 125 lines · Himal Prasad
Quoted 109 lines · Matthew Brost
Migrating a device-private THP back to system memory has two distinct paths in
__migrate_device_pages(): the fast path where both source and destination carryMIGRATE_PFN_COMPOUND, and the fallback path where the destination could only be satisfied with order-0 folios and the source THP therefore has to be split viamigrate_vma_split_unmapped_folio().The fallback path only triggers under genuine memory pressure, which makes it both rare and awkward to reproduce, yet it is the path where the interesting refcounting happens (the CPU fault holds an extra reference on the device folio taken by
do_huge_pmd_device_private()).Add a
fault_attr, modelled onbackup_fault_injectinttm_pool.c, that forces the higher-order allocation indrm_pagemap_migrate_populate_ram_pfn()to fail so the existing order-0 fallback is taken deterministically.The attribute is exposed at
/sys/kernel/debug/drm_pagemap_fault_injectand requiresCONFIG_FAULT_INJECTION_DEBUG_FS. WithCONFIG_FAULT_INJECTIONdisabled the helper compiles out to a constant false and the injection has no cost.Cc Andrew Morton <[email protected]>Cc David Hildenbrand <[email protected]>Cc Lorenzo Stoakes <[email protected]>Cc Zi Yan <[email protected]>Cc Baolin Wang <[email protected]>Cc Liam R. Howlett <[email protected]>Cc Nico Pache <[email protected]>Cc Ryan Roberts <[email protected]>Cc Dev Jain <[email protected]>Cc Barry Song <[email protected]>Cc Lance Yang <[email protected]>Cc Usama Arif <[email protected]>Cc Joshua Hahn <[email protected]>Cc Rakie Kim <[email protected]>Cc Byungchul Park <[email protected]>Cc Gregory Price <[email protected]>Cc Ying Huang <[email protected]>Cc Alistair Popple <[email protected]>Cc Balbir Singh <[email protected]>Cc Maarten Lankhorst <[email protected]>Cc Maxime Ripard <[email protected]>Cc Thomas Zimmermann <[email protected]>Cc David Airlie <[email protected]>Cc Simona Vetter <[email protected]>Cc Thomas Hellström <[email protected]>Cc Francois Dugast <[email protected]>Assisted-by GitHub_Copilot:claude-opus-5Signed-off-by Matthew Brost <[email protected]>--- drivers/gpu/drm/drm_pagemap.c | 36 ++++++++++++++++++++++++++++++++++- 1 file changed, 35 insertions(+), 1 deletion(-)drivers/gpu/drm/drm_pagemap.c +27
-1@@ -3,6 +3,7 @@* Copyright © 2024-2025 Intel Corporation */ +#include <linux/debugfs.h> #include <linux/dma-fence.h> #include <linux/dma-mapping.h> #include <linux/migrate.h> @@ -12,6 +13,27 @@#include <drm/drm_pagemap_util.h> #include <drm/drm_print.h> +#ifdef CONFIG_FAULT_INJECTION +#include <linux/fault-inject.h> +static DECLARE_FAULT_ATTR (migrate_to_ram_fault_inject); + +/* +* Force a higher-order destination folio allocation to fail in +* drm_pagemap_migrate_populate_ram_pfn(), exercising the order-0 fallback +* (and, in turn, the THP split path in __migrate_device_pages()) without +* having to drive the system into actual memory pressure. +*/ +static bool drm_pagemap_fault_inject_folio (void ) +{ +return should_fail (&migrate_to_ram_fault_inject,1 ); +} +#else +static bool drm_pagemap_fault_inject_folio (void ) +{ +return false; +} +#endif +/** * DOC: Overview * @@ -960,7 +982,9 @@ static int drm_pagemap_migrate_populate_ram_pfn(struct vm_area_struct *vas,if (order) gfp |= __GFP_NOWARN; -if (vas) +if (order &&drm_pagemap_fault_inject_folio ()) + folio =NULL ; +else if (vas) folio =vma_alloc_folio (gfp, order, vas, addr);else folio =folio_alloc (gfp, order);@@ -1554,6 +1578,16 @@ void drm_pagemap_destroy(struct drm_pagemap *dpagemap, bool is_atomic_or_reclaimkfree (dpagemap); } +static int __init drm_pagemap_module_init (void ) +{drivers/gpu/drm/drm_pagemap.c void drm_pagemap_destroy(struct drm_pagemap *dpagemap, bool is_atomic_or_reclaim · line 1591
Quoted 10 lines
drivers/gpu/drm/drm_pagemap.c +8
-0+#if defined(CONFIG_DEBUG_FS ) && defined(CONFIG_FAULT_INJECTION ) +fault_create_debugfs_attr ("drm_pagemap_fault_inject" ,NULL , + &migrate_to_ram_fault_inject); +#endif +return 0 ; +} +module_init (drm_pagemap_module_init); +static void drm_pagemap_exit (void ) {Missed fault injection debugfs removal ?
Quoted 1 line
Sashiko flags it and looks valid concern.
I checked on this and kernel wide no code seems to undo fault_create_debugfs_attr on module unload, nor is there a function in linux/fault-inject.h to undo all debugfs entries setup.
So IMO this is either everyone is kernel is doing this wrong or this is a non-issue. debugfs_create_file kernel doc seems to indicate all debugfs enteries should be removed with debugfs_remove though (?). Either way I'd say this out of scope for this series.
Matt
Quoted 2 lines
Quoted 1 line
drivers/gpu/drm/drm_pagemap.c +0
-0flush_work (&drm_pagemap_work);
Ghimiray, Himal Prasad
reviewerRe: [PATCH v3 6/6] drm/pagemap: Add fault injection for higher-order RAM folio allocation
Quoted 126 lines · Matthew Brost
Quoted 125 lines · Himal Prasad
Quoted 109 lines · Matthew Brost
Migrating a device-private THP back to system memory has two distinct paths in
__migrate_device_pages(): the fast path where both source and destination carryMIGRATE_PFN_COMPOUND, and the fallback path where the destination could only be satisfied with order-0 folios and the source THP therefore has to be split viamigrate_vma_split_unmapped_folio().The fallback path only triggers under genuine memory pressure, which makes it both rare and awkward to reproduce, yet it is the path where the interesting refcounting happens (the CPU fault holds an extra reference on the device folio taken by
do_huge_pmd_device_private()).Add a
fault_attr, modelled onbackup_fault_injectinttm_pool.c, that forces the higher-order allocation indrm_pagemap_migrate_populate_ram_pfn()to fail so the existing order-0 fallback is taken deterministically.The attribute is exposed at
/sys/kernel/debug/drm_pagemap_fault_injectand requiresCONFIG_FAULT_INJECTION_DEBUG_FS. WithCONFIG_FAULT_INJECTIONdisabled the helper compiles out to a constant false and the injection has no cost.Cc Andrew Morton <[email protected]>Cc David Hildenbrand <[email protected]>Cc Lorenzo Stoakes <[email protected]>Cc Zi Yan <[email protected]>Cc Baolin Wang <[email protected]>Cc Liam R. Howlett <[email protected]>Cc Nico Pache <[email protected]>Cc Ryan Roberts <[email protected]>Cc Dev Jain <[email protected]>Cc Barry Song <[email protected]>Cc Lance Yang <[email protected]>Cc Usama Arif <[email protected]>Cc Joshua Hahn <[email protected]>Cc Rakie Kim <[email protected]>Cc Byungchul Park <[email protected]>Cc Gregory Price <[email protected]>Cc Ying Huang <[email protected]>Cc Alistair Popple <[email protected]>Cc Balbir Singh <[email protected]>Cc Maarten Lankhorst <[email protected]>Cc Maxime Ripard <[email protected]>Cc Thomas Zimmermann <[email protected]>Cc David Airlie <[email protected]>Cc Simona Vetter <[email protected]>Cc Thomas Hellström <[email protected]>Cc Francois Dugast <[email protected]>Assisted-by GitHub_Copilot:claude-opus-5Signed-off-by Matthew Brost <[email protected]>--- drivers/gpu/drm/drm_pagemap.c | 36 ++++++++++++++++++++++++++++++++++- 1 file changed, 35 insertions(+), 1 deletion(-)drivers/gpu/drm/drm_pagemap.c +27
-1@@ -3,6 +3,7 @@* Copyright © 2024-2025 Intel Corporation */ +#include <linux/debugfs.h> #include <linux/dma-fence.h> #include <linux/dma-mapping.h> #include <linux/migrate.h> @@ -12,6 +13,27 @@#include <drm/drm_pagemap_util.h> #include <drm/drm_print.h> +#ifdef CONFIG_FAULT_INJECTION +#include <linux/fault-inject.h> +static DECLARE_FAULT_ATTR (migrate_to_ram_fault_inject); + +/* +* Force a higher-order destination folio allocation to fail in +* drm_pagemap_migrate_populate_ram_pfn(), exercising the order-0 fallback +* (and, in turn, the THP split path in __migrate_device_pages()) without +* having to drive the system into actual memory pressure. +*/ +static bool drm_pagemap_fault_inject_folio (void ) +{ +return should_fail (&migrate_to_ram_fault_inject,1 ); +} +#else +static bool drm_pagemap_fault_inject_folio (void ) +{ +return false; +} +#endif +/** * DOC: Overview * @@ -960,7 +982,9 @@ static int drm_pagemap_migrate_populate_ram_pfn(struct vm_area_struct *vas,if (order) gfp |= __GFP_NOWARN; -if (vas) +if (order &&drm_pagemap_fault_inject_folio ()) + folio =NULL ; +else if (vas) folio =vma_alloc_folio (gfp, order, vas, addr);else folio =folio_alloc (gfp, order);@@ -1554,6 +1578,16 @@ void drm_pagemap_destroy(struct drm_pagemap *dpagemap, bool is_atomic_or_reclaimkfree (dpagemap); } +static int __init drm_pagemap_module_init (void ) +{drivers/gpu/drm/drm_pagemap.c void drm_pagemap_destroy(struct drm_pagemap *dpagemap, bool is_atomic_or_reclaim · line 1591
Quoted 10 lines
drivers/gpu/drm/drm_pagemap.c +8
-0+#if defined(CONFIG_DEBUG_FS ) && defined(CONFIG_FAULT_INJECTION ) +fault_create_debugfs_attr ("drm_pagemap_fault_inject" ,NULL , + &migrate_to_ram_fault_inject); +#endif +return 0 ; +} +module_init (drm_pagemap_module_init); +static void drm_pagemap_exit (void ) {Missed fault injection debugfs removal ?
Quoted 5 lines
Quoted 1 line
Sashiko flags it and looks valid concern.
I checked on this and kernel wide no code seems to undo
fault_create_debugfs_attron module unload, nor is there a function inlinux/fault-inject.hto undo all debugfs entries setup.
I believe the cleanup is done via standard debugfs_remove_recursive via passing the fault_create_debugfs_attr dir or parent. Here we have no parent so
dir = fault_create_debugfs_attr at init
and debugfs_remove_recursive(dir) should be sufficient during drm_pagemap_exit
I assume not cleaning it exit might leave the debugfs entries incase of module unload.
Quoted 10 lines
So IMO this is either everyone is kernel is doing this wrong or this is a non-issue.
debugfs_create_filekernel doc seems to indicate all debugfs enteries should be removed withdebugfs_removethough (?). Either way I'd say this out of scope for this series.Matt
Quoted 2 lines
Quoted 1 line
drivers/gpu/drm/drm_pagemap.c +0
-0flush_work (&drm_pagemap_work);
Matthew Brost
maintainerRe: [PATCH v3 6/6] drm/pagemap: Add fault injection for higher-order RAM folio allocation
Quoted 139 lines · Himal Prasad
Quoted 126 lines · Matthew Brost
Quoted 125 lines · Himal Prasad
Quoted 109 lines · Matthew Brost
Migrating a device-private THP back to system memory has two distinct paths in
__migrate_device_pages(): the fast path where both source and destination carryMIGRATE_PFN_COMPOUND, and the fallback path where the destination could only be satisfied with order-0 folios and the source THP therefore has to be split viamigrate_vma_split_unmapped_folio().The fallback path only triggers under genuine memory pressure, which makes it both rare and awkward to reproduce, yet it is the path where the interesting refcounting happens (the CPU fault holds an extra reference on the device folio taken by
do_huge_pmd_device_private()).Add a
fault_attr, modelled onbackup_fault_injectinttm_pool.c, that forces the higher-order allocation indrm_pagemap_migrate_populate_ram_pfn()to fail so the existing order-0 fallback is taken deterministically.The attribute is exposed at
/sys/kernel/debug/drm_pagemap_fault_injectand requiresCONFIG_FAULT_INJECTION_DEBUG_FS. WithCONFIG_FAULT_INJECTIONdisabled the helper compiles out to a constant false and the injection has no cost.Cc Andrew Morton <[email protected]>Cc David Hildenbrand <[email protected]>Cc Lorenzo Stoakes <[email protected]>Cc Zi Yan <[email protected]>Cc Baolin Wang <[email protected]>Cc Liam R. Howlett <[email protected]>Cc Nico Pache <[email protected]>Cc Ryan Roberts <[email protected]>Cc Dev Jain <[email protected]>Cc Barry Song <[email protected]>Cc Lance Yang <[email protected]>Cc Usama Arif <[email protected]>Cc Joshua Hahn <[email protected]>Cc Rakie Kim <[email protected]>Cc Byungchul Park <[email protected]>Cc Gregory Price <[email protected]>Cc Ying Huang <[email protected]>Cc Alistair Popple <[email protected]>Cc Balbir Singh <[email protected]>Cc Maarten Lankhorst <[email protected]>Cc Maxime Ripard <[email protected]>Cc Thomas Zimmermann <[email protected]>Cc David Airlie <[email protected]>Cc Simona Vetter <[email protected]>Cc Thomas Hellström <[email protected]>Cc Francois Dugast <[email protected]>Assisted-by GitHub_Copilot:claude-opus-5Signed-off-by Matthew Brost <[email protected]>--- drivers/gpu/drm/drm_pagemap.c | 36 ++++++++++++++++++++++++++++++++++- 1 file changed, 35 insertions(+), 1 deletion(-)drivers/gpu/drm/drm_pagemap.c +27
-1@@ -3,6 +3,7 @@* Copyright © 2024-2025 Intel Corporation */ +#include <linux/debugfs.h> #include <linux/dma-fence.h> #include <linux/dma-mapping.h> #include <linux/migrate.h> @@ -12,6 +13,27 @@#include <drm/drm_pagemap_util.h> #include <drm/drm_print.h> +#ifdef CONFIG_FAULT_INJECTION +#include <linux/fault-inject.h> +static DECLARE_FAULT_ATTR (migrate_to_ram_fault_inject); + +/* +* Force a higher-order destination folio allocation to fail in +* drm_pagemap_migrate_populate_ram_pfn(), exercising the order-0 fallback +* (and, in turn, the THP split path in __migrate_device_pages()) without +* having to drive the system into actual memory pressure. +*/ +static bool drm_pagemap_fault_inject_folio (void ) +{ +return should_fail (&migrate_to_ram_fault_inject,1 ); +} +#else +static bool drm_pagemap_fault_inject_folio (void ) +{ +return false; +} +#endif +/** * DOC: Overview * @@ -960,7 +982,9 @@ static int drm_pagemap_migrate_populate_ram_pfn(struct vm_area_struct *vas,if (order) gfp |= __GFP_NOWARN; -if (vas) +if (order &&drm_pagemap_fault_inject_folio ()) + folio =NULL ; +else if (vas) folio =vma_alloc_folio (gfp, order, vas, addr);else folio =folio_alloc (gfp, order);@@ -1554,6 +1578,16 @@ void drm_pagemap_destroy(struct drm_pagemap *dpagemap, bool is_atomic_or_reclaimkfree (dpagemap); } +static int __init drm_pagemap_module_init (void ) +{drivers/gpu/drm/drm_pagemap.c void drm_pagemap_destroy(struct drm_pagemap *dpagemap, bool is_atomic_or_reclaim · line 1591
Quoted 10 lines
drivers/gpu/drm/drm_pagemap.c +8
-0+#if defined(CONFIG_DEBUG_FS ) && defined(CONFIG_FAULT_INJECTION ) +fault_create_debugfs_attr ("drm_pagemap_fault_inject" ,NULL , + &migrate_to_ram_fault_inject); +#endif +return 0 ; +} +module_init (drm_pagemap_module_init); +static void drm_pagemap_exit (void ) {Missed fault injection debugfs removal ?
Quoted 5 lines
Quoted 1 line
Sashiko flags it and looks valid concern.
I checked on this and kernel wide no code seems to undo
fault_create_debugfs_attron module unload, nor is there a function inlinux/fault-inject.hto undo all debugfs entries setup.I believe the cleanup is done via standard
debugfs_remove_recursivevia passing thefault_create_debugfs_attrdir or parent. Here we have no parent so
Quoted 7 lines
dir =
fault_create_debugfs_attrat initand
debugfs_remove_recursive(dir)should be sufficient duringdrm_pagemap_exitI assume not cleaning it exit might leave the debugfs entries incase of module unload.
I think you are right here - realised this after typing this.
Will fix.
Matt
Quoted 11 lines
Quoted 10 lines
So IMO this is either everyone is kernel is doing this wrong or this is a non-issue.
debugfs_create_filekernel doc seems to indicate all debugfs enteries should be removed withdebugfs_removethough (?). Either way I'd say this out of scope for this series.Matt
Quoted 2 lines
Quoted 1 line
drivers/gpu/drm/drm_pagemap.c +0
-0flush_work (&drm_pagemap_work);
Patchwork
CI✗ CI.checkpatch: warning for Fix device page migration in low memory fallback (rev3)
In reply to Matthew Brost== Series Details ==
== Series Details ==
Series: Fix device page migration in low memory fallback (rev3)
URL : https://patchwork.freedesktop.org/series/171651/
State : warning
== Summary ==
+ KERNEL=/kernel
+ git clone https://gitlab.freedesktop.org/drm/maintainer-tools mt Cloning into 'mt'...
warning: redirecting to https://gitlab.freedesktop.org/drm/maintainer-tools.git/
+ git -C mt rev-list -n1 origin/master 061140b9bc586ae7f40abc1249c97e1cc72d1b9d
+ cd /kernel
+ git config --global --add safe.directory /kernel
+ git log -n1
commit 2141fd43a2ebb32af5ad0470d78791dc60c58131
Author: Matthew Brost <[email protected]> Date: Wed Aug 5 16:10:41 2026 -0700
drm/pagemap: Add fault injection for higher-order RAM folio allocation
Migrating a device-private THP back to system memory has two distinct paths in __migrate_device_pages(): the fast path where both source and destination carry MIGRATE_PFN_COMPOUND, and the fallback path where the destination could only be satisfied with order-0 folios and the source THP therefore has to be split via migrate_vma_split_unmapped_folio().
The fallback path only triggers under genuine memory pressure, which makes it both rare and awkward to reproduce, yet it is the path where the interesting refcounting happens (the CPU fault holds an extra reference on the device folio taken by do_huge_pmd_device_private()).
Add a fault_attr, modelled on backup_fault_inject in ttm_pool.c, that forces the higher-order allocation in drm_pagemap_migrate_populate_ram_pfn() to fail so the existing order-0 fallback is taken deterministically.
The attribute is exposed at /sys/kernel/debug/drm_pagemap_fault_inject and requires CONFIG_FAULT_INJECTION_DEBUG_FS. With CONFIG_FAULT_INJECTION disabled the helper compiles out to a constant false and the injection has no cost.
+ /mt/dim checkpatch ff9b76577dfe70713faaa2f19a30424ec9a51a18 drm-intel64d31b11a5bd mm/migrate_device: Clear stale mapping after freeing swapcache127768c7d643 mm/migrate_device: Do not write past the end of the src_pfns array
-:25: WARNING:BAD_REPORTED_BY_LINK: Reported-by: should be immediately followed by Closes: or Link: with a URL to the report #25:
total: 0 errors, 1 warnings, 0 checks, 16 lines checkedc9297bbaa89d mm/migrate_device: Fix THP splitting of a CPU faulted device private folio962561d9f77f drm/pagemap: dma-unmap pages before handling migration errors
-:19: WARNING:BAD_REPORTED_BY_LINK: Reported-by: should be immediately followed by Closes: or Link: with a URL to the report #19:
total: 0 errors, 1 warnings, 0 checks, 32 lines checked8e46b528926a drm/pagemap: Fix folio allocation fallback and use-after-put 2141fd43a2eb drm/pagemap: Add fault injection for higher-order RAM folio allocation
Patchwork
CI✓ CI.KUnit: success for Fix device page migration in low memory fallback (rev3)
In reply to Matthew Brost== Series Details ==
== Series Details ==
Series: Fix device page migration in low memory fallback (rev3)
URL : https://patchwork.freedesktop.org/series/171651/
State : success
== Summary ==
+ trap cleanup EXIT
+ /kernel/tools/testing/kunit/kunit.py run --kunitconfig /kernel/drivers/gpu/drm/xe/.kunitconfig [23:17:12] Configuring KUnit Kernel ...
Generating .config ...
Populating config with:
$ make ARCH=um O=.kunit olddefconfig [23:17:17] Building KUnit Kernel ... Populating config with: $ make ARCH=um O=.kunit olddefconfig Building with: $ make all compile_commands.json scripts_gdb ARCH=um O=.kunit --jobs=48 [23:17:48] Starting KUnit Kernel (1/1)... [23:17:48] ============================================================ Running tests with: $ .kunit/linux kunit.enable=1 mem=1G console=tty kunit_shutdown=halt [23:17:49] ================== guc_buf (11 subtests) =================== [23:17:49] [PASSED] test_smallest [23:17:49] [PASSED] test_largest [23:17:49] [PASSED] test_granular [23:17:49] [PASSED] test_unique [23:17:49] [PASSED] test_overlap [23:17:49] [PASSED] test_reusable [23:17:49] [PASSED] test_too_big [23:17:49] [PASSED] test_flush [23:17:49] [PASSED] test_lookup [23:17:49] [PASSED] test_data [23:17:49] [PASSED] test_class [23:17:49] ===================== [PASSED] guc_buf ===================== [23:17:49] =================== guc_dbm (7 subtests) =================== [23:17:49] [PASSED] test_empty [23:17:49] [PASSED] test_default [23:17:49] ======================== test_size ======================== [23:17:49] [PASSED] 4 [23:17:49] [PASSED] 8 [23:17:49] [PASSED] 32 [23:17:49] [PASSED] 256 [23:17:49] ==================== [PASSED] test_size ==================== [23:17:49] ======================= test_reuse ======================== [23:17:49] [PASSED] 4 [23:17:49] [PASSED] 8 [23:17:49] [PASSED] 32 [23:17:49] [PASSED] 256 [23:17:49] =================== [PASSED] test_reuse ==================== [23:17:49] =================== test_range_overlap ==================== [23:17:49] [PASSED] 4 [23:17:49] [PASSED] 8 [23:17:49] [PASSED] 32 [23:17:49] [PASSED] 256 [23:17:49] =============== [PASSED] test_range_overlap ================ [23:17:49] =================== test_range_compact ==================== [23:17:49] [PASSED] 4 [23:17:49] [PASSED] 8 [23:17:49] [PASSED] 32 [23:17:49] [PASSED] 256 [23:17:49] =============== [PASSED] test_range_compact ================ [23:17:49] ==================== test_range_spare ===================== [23:17:49] [PASSED] 4 [23:17:49] [PASSED] 8 [23:17:49] [PASSED] 32 [23:17:49] [PASSED] 256 [23:17:49] ================ [PASSED] test_range_spare ================= [23:17:49] ===================== [PASSED] guc_dbm ===================== [23:17:49] =================== guc_idm (6 subtests) =================== [23:17:49] [PASSED] bad_init [23:17:49] [PASSED] no_init [23:17:49] [PASSED] init_fini [23:17:49] [PASSED] check_used [23:17:49] [PASSED] check_quota [23:17:49] [PASSED] check_all [23:17:49] ===================== [PASSED] guc_idm ===================== [23:17:49] =============== guc_klv_helpers (9 subtests) =============== [23:17:49] [PASSED] test_count [23:17:49] [PASSED] test_encode_u32 [23:17:49] [PASSED] test_encode_u64 [23:17:49] [PASSED] test_encode_string [23:17:49] [PASSED] test_encode_object_raw [23:17:49] [PASSED] test_encode_object_klv [23:17:49] [PASSED] test_encode_object_nested [23:17:49] [PASSED] test_encode_object_basic [23:17:49] [PASSED] test_print [23:17:49] ================= [PASSED] guc_klv_helpers ================= [23:17:49] ================== no_relay (3 subtests) =================== [23:17:49] [PASSED] xe_drops_guc2pf_if_not_ready [23:17:49] [PASSED] xe_drops_guc2vf_if_not_ready [23:17:49] [PASSED] xe_rejects_send_if_not_ready [23:17:49] ==================== [PASSED] no_relay ===================== [23:17:49] ================== pf_relay (14 subtests) ================== [23:17:49] [PASSED] pf_rejects_guc2pf_too_short [23:17:49] [PASSED] pf_rejects_guc2pf_too_long [23:17:49] [PASSED] pf_rejects_guc2pf_no_payload [23:17:49] [PASSED] pf_fails_no_payload [23:17:49] [PASSED] pf_fails_bad_origin [23:17:49] [PASSED] pf_fails_bad_type [23:17:49] [PASSED] pf_txn_reports_error [23:17:49] [PASSED] pf_txn_sends_pf2guc [23:17:49] [PASSED] pf_sends_pf2guc [23:17:49] [SKIPPED] pf_loopback_nop (requires CONFIG_DRM_XE_DEBUG_SRIOV) [23:17:49] [SKIPPED] pf_loopback_echo (requires CONFIG_DRM_XE_DEBUG_SRIOV) [23:17:49] [SKIPPED] pf_loopback_fail (requires CONFIG_DRM_XE_DEBUG_SRIOV) [23:17:49] [SKIPPED] pf_loopback_busy (requires CONFIG_DRM_XE_DEBUG_SRIOV) [23:17:49] [SKIPPED] pf_loopback_retry (requires CONFIG_DRM_XE_DEBUG_SRIOV) [23:17:49] ==================== [PASSED] pf_relay ===================== [23:17:49] ================== vf_relay (3 subtests) =================== [23:17:49] [PASSED] vf_rejects_guc2vf_too_short [23:17:49] [PASSED] vf_rejects_guc2vf_too_long [23:17:49] [PASSED] vf_rejects_guc2vf_no_payload [23:17:49] ==================== [PASSED] vf_relay ===================== [23:17:49] ================ pf_gt_config (9 subtests) ================= [23:17:49] [PASSED] fair_contexts_1vf [23:17:49] [PASSED] fair_doorbells_1vf [23:17:49] [PASSED] fair_ggtt_1vf [23:17:49] ====================== fair_vram_1vf ====================== [23:17:49] [PASSED] 3.50 GiB [23:17:49] [PASSED] 11.5 GiB [23:17:49] [PASSED] 15.5 GiB [23:17:49] [PASSED] 31.5 GiB [23:17:49] [PASSED] 63.5 GiB [23:17:49] [PASSED] 1.91 GiB [23:17:49] ================== [PASSED] fair_vram_1vf ================== [23:17:49] ================ fair_vram_1vf_admin_only ================= [23:17:49] [PASSED] 3.50 GiB [23:17:49] [PASSED] 11.5 GiB [23:17:49] [PASSED] 15.5 GiB [23:17:49] [PASSED] 31.5 GiB [23:17:49] [PASSED] 63.5 GiB [23:17:49] [PASSED] 1.91 GiB [23:17:49] ============ [PASSED] fair_vram_1vf_admin_only ============= [23:17:49] ====================== fair_contexts ====================== [23:17:49] [PASSED] 1 VF [23:17:49] [PASSED] 2 VFs [23:17:49] [PASSED] 3 VFs [23:17:49] [PASSED] 4 VFs [23:17:49] [PASSED] 5 VFs [23:17:49] [PASSED] 6 VFs [23:17:49] [PASSED] 7 VFs [23:17:49] [PASSED] 8 VFs [23:17:49] [PASSED] 9 VFs [23:17:49] [PASSED] 10 VFs [23:17:49] [PASSED] 11 VFs [23:17:49] [PASSED] 12 VFs [23:17:49] [PASSED] 13 VFs [23:17:49] [PASSED] 14 VFs [23:17:49] [PASSED] 15 VFs [23:17:49] [PASSED] 16 VFs [23:17:49] [PASSED] 17 VFs [23:17:49] [PASSED] 18 VFs [23:17:49] [PASSED] 19 VFs [23:17:49] [PASSED] 20 VFs [23:17:49] [PASSED] 21 VFs [23:17:49] [PASSED] 22 VFs [23:17:49] [PASSED] 23 VFs [23:17:49] [PASSED] 24 VFs [23:17:49] [PASSED] 25 VFs [23:17:49] [PASSED] 26 VFs [23:17:49] [PASSED] 27 VFs [23:17:49] [PASSED] 28 VFs [23:17:49] [PASSED] 29 VFs [23:17:49] [PASSED] 30 VFs [23:17:49] [PASSED] 31 VFs [23:17:49] [PASSED] 32 VFs [23:17:49] [PASSED] 33 VFs [23:17:49] [PASSED] 34 VFs [23:17:49] [PASSED] 35 VFs [23:17:49] [PASSED] 36 VFs [23:17:49] [PASSED] 37 VFs [23:17:49] [PASSED] 38 VFs [23:17:49] [PASSED] 39 VFs [23:17:49] [PASSED] 40 VFs [23:17:49] [PASSED] 41 VFs [23:17:49] [PASSED] 42 VFs [23:17:49] [PASSED] 43 VFs [23:17:49] [PASSED] 44 VFs [23:17:49] [PASSED] 45 VFs [23:17:49] [PASSED] 46 VFs [23:17:49] [PASSED] 47 VFs [23:17:49] [PASSED] 48 VFs [23:17:49] [PASSED] 49 VFs [23:17:49] [PASSED] 50 VFs [23:17:49] [PASSED] 51 VFs [23:17:49] [PASSED] 52 VFs [23:17:49] [PASSED] 53 VFs [23:17:49] [PASSED] 54 VFs [23:17:49] [PASSED] 55 VFs [23:17:49] [PASSED] 56 VFs [23:17:49] [PASSED] 57 VFs [23:17:49] [PASSED] 58 VFs [23:17:49] [PASSED] 59 VFs [23:17:49] [PASSED] 60 VFs [23:17:49] [PASSED] 61 VFs [23:17:49] [PASSED] 62 VFs [23:17:49] [PASSED] 63 VFs [23:17:49] ================== [PASSED] fair_contexts ================== [23:17:49] ===================== fair_doorbells ====================== [23:17:49] [PASSED] 1 VF [23:17:49] [PASSED] 2 VFs [23:17:49] [PASSED] 3 VFs [23:17:49] [PASSED] 4 VFs [23:17:49] [PASSED] 5 VFs [23:17:49] [PASSED] 6 VFs [23:17:49] [PASSED] 7 VFs [23:17:49] [PASSED] 8 VFs [23:17:49] [PASSED] 9 VFs [23:17:49] [PASSED] 10 VFs [23:17:49] [PASSED] 11 VFs [23:17:49] [PASSED] 12 VFs [23:17:49] [PASSED] 13 VFs [23:17:49] [PASSED] 14 VFs [23:17:49] [PASSED] 15 VFs [23:17:49] [PASSED] 16 VFs [23:17:49] [PASSED] 17 VFs [23:17:49] [PASSED] 18 VFs [23:17:49] [PASSED] 19 VFs [23:17:49] [PASSED] 20 VFs [23:17:49] [PASSED] 21 VFs [23:17:49] [PASSED] 22 VFs [23:17:49] [PASSED] 23 VFs [23:17:49] [PASSED] 24 VFs [23:17:49] [PASSED] 25 VFs [23:17:49] [PASSED] 26 VFs [23:17:49] [PASSED] 27 VFs [23:17:49] [PASSED] 28 VFs [23:17:49] [PASSED] 29 VFs [23:17:49] [PASSED] 30 VFs [23:17:49] [PASSED] 31 VFs [23:17:49] [PASSED] 32 VFs [23:17:49] [PASSED] 33 VFs [23:17:49] [PASSED] 34 VFs [23:17:49] [PASSED] 35 VFs [23:17:49] [PASSED] 36 VFs [23:17:49] [PASSED] 37 VFs [23:17:49] [PASSED] 38 VFs [23:17:49] [PASSED] 39 VFs [23:17:49] [PASSED] 40 VFs [23:17:49] [PASSED] 41 VFs [23:17:49] [PASSED] 42 VFs [23:17:49] [PASSED] 43 VFs [23:17:49] [PASSED] 44 VFs [23:17:49] [PASSED] 45 VFs [23:17:49] [PASSED] 46 VFs [23:17:49] [PASSED] 47 VFs [23:17:49] [PASSED] 48 VFs [23:17:49] [PASSED] 49 VFs [23:17:49] [PASSED] 50 VFs [23:17:49] [PASSED] 51 VFs [23:17:49] [PASSED] 52 VFs [23:17:49] [PASSED] 53 VFs [23:17:49] [PASSED] 54 VFs [23:17:49] [PASSED] 55 VFs [23:17:49] [PASSED] 56 VFs [23:17:49] [PASSED] 57 VFs [23:17:49] [PASSED] 58 VFs [23:17:49] [PASSED] 59 VFs [23:17:49] [PASSED] 60 VFs [23:17:49] [PASSED] 61 VFs [23:17:49] [PASSED] 62 VFs [23:17:49] [PASSED] 63 VFs [23:17:49] ================= [PASSED] fair_doorbells ================== [23:17:49] ======================== fair_ggtt ======================== [23:17:49] [PASSED] 1 VF [23:17:49] [PASSED] 2 VFs [23:17:49] [PASSED] 3 VFs [23:17:49] [PASSED] 4 VFs [23:17:49] [PASSED] 5 VFs [23:17:49] [PASSED] 6 VFs [23:17:49] [PASSED] 7 VFs [23:17:49] [PASSED] 8 VFs [23:17:49] [PASSED] 9 VFs [23:17:49] [PASSED] 10 VFs [23:17:49] [PASSED] 11 VFs [23:17:49] [PASSED] 12 VFs [23:17:49] [PASSED] 13 VFs [23:17:49] [PASSED] 14 VFs [23:17:49] [PASSED] 15 VFs [23:17:49] [PASSED] 16 VFs [23:17:49] [PASSED] 17 VFs [23:17:49] [PASSED] 18 VFs [23:17:49] [PASSED] 19 VFs [23:17:49] [PASSED] 20 VFs [23:17:49] [PASSED] 21 VFs [23:17:49] [PASSED] 22 VFs [23:17:49] [PASSED] 23 VFs [23:17:49] [PASSED] 24 VFs [23:17:49] [PASSED] 25 VFs [23:17:49] [PASSED] 26 VFs [23:17:49] [PASSED] 27 VFs [23:17:49] [PASSED] 28 VFs [23:17:49] [PASSED] 29 VFs [23:17:49] [PASSED] 30 VFs [23:17:49] [PASSED] 31 VFs [23:17:49] [PASSED] 32 VFs [23:17:49] [PASSED] 33 VFs [23:17:49] [PASSED] 34 VFs [23:17:49] [PASSED] 35 VFs [23:17:49] [PASSED] 36 VFs [23:17:49] [PASSED] 37 VFs [23:17:49] [PASSED] 38 VFs [23:17:49] [PASSED] 39 VFs [23:17:49] [PASSED] 40 VFs [23:17:49] [PASSED] 41 VFs [23:17:49] [PASSED] 42 VFs [23:17:49] [PASSED] 43 VFs [23:17:49] [PASSED] 44 VFs [23:17:49] [PASSED] 45 VFs [23:17:49] [PASSED] 46 VFs [23:17:49] [PASSED] 47 VFs [23:17:49] [PASSED] 48 VFs [23:17:49] [PASSED] 49 VFs [23:17:49] [PASSED] 50 VFs [23:17:49] [PASSED] 51 VFs [23:17:49] [PASSED] 52 VFs [23:17:49] [PASSED] 53 VFs [23:17:49] [PASSED] 54 VFs [23:17:49] [PASSED] 55 VFs [23:17:49] [PASSED] 56 VFs [23:17:49] [PASSED] 57 VFs [23:17:49] [PASSED] 58 VFs [23:17:49] [PASSED] 59 VFs [23:17:49] [PASSED] 60 VFs [23:17:49] [PASSED] 61 VFs [23:17:49] [PASSED] 62 VFs [23:17:49] [PASSED] 63 VFs [23:17:49] ==================== [PASSED] fair_ggtt ==================== [23:17:49] ======================== fair_vram ======================== [23:17:49] [PASSED] 1 VF [23:17:49] [PASSED] 2 VFs [23:17:49] [PASSED] 3 VFs [23:17:49] [PASSED] 4 VFs [23:17:49] [PASSED] 5 VFs [23:17:49] [PASSED] 6 VFs [23:17:49] [PASSED] 7 VFs [23:17:49] [PASSED] 8 VFs [23:17:49] [PASSED] 9 VFs [23:17:49] [PASSED] 10 VFs [23:17:49] [PASSED] 11 VFs [23:17:49] [PASSED] 12 VFs [23:17:49] [PASSED] 13 VFs [23:17:49] [PASSED] 14 VFs [23:17:49] [PASSED] 15 VFs [23:17:49] [PASSED] 16 VFs [23:17:49] [PASSED] 17 VFs [23:17:49] [PASSED] 18 VFs [23:17:49] [PASSED] 19 VFs [23:17:49] [PASSED] 20 VFs [23:17:49] [PASSED] 21 VFs [23:17:49] [PASSED] 22 VFs [23:17:49] [PASSED] 23 VFs [23:17:49] [PASSED] 24 VFs [23:17:49] [PASSED] 25 VFs [23:17:49] [PASSED] 26 VFs [23:17:49] [PASSED] 27 VFs [23:17:49] [PASSED] 28 VFs [23:17:49] [PASSED] 29 VFs [23:17:49] [PASSED] 30 VFs [23:17:49] [PASSED] 31 VFs [23:17:49] [PASSED] 32 VFs [23:17:49] [PASSED] 33 VFs [23:17:49] [PASSED] 34 VFs [23:17:49] [PASSED] 35 VFs [23:17:49] [PASSED] 36 VFs [23:17:49] [PASSED] 37 VFs [23:17:49] [PASSED] 38 VFs [23:17:49] [PASSED] 39 VFs [23:17:49] [PASSED] 40 VFs [23:17:49] [PASSED] 41 VFs [23:17:49] [PASSED] 42 VFs [23:17:49] [PASSED] 43 VFs [23:17:49] [PASSED] 44 VFs [23:17:49] [PASSED] 45 VFs [23:17:49] [PASSED] 46 VFs [23:17:49] [PASSED] 47 VFs [23:17:49] [PASSED] 48 VFs [23:17:49] [PASSED] 49 VFs [23:17:49] [PASSED] 50 VFs [23:17:49] [PASSED] 51 VFs [23:17:49] [PASSED] 52 VFs [23:17:49] [PASSED] 53 VFs [23:17:49] [PASSED] 54 VFs [23:17:49] [PASSED] 55 VFs [23:17:49] [PASSED] 56 VFs [23:17:49] [PASSED] 57 VFs [23:17:49] [PASSED] 58 VFs [23:17:49] [PASSED] 59 VFs [23:17:49] [PASSED] 60 VFs [23:17:49] [PASSED] 61 VFs [23:17:49] [PASSED] 62 VFs [23:17:49] [PASSED] 63 VFs [23:17:49] ==================== [PASSED] fair_vram ==================== [23:17:49] ================== [PASSED] pf_gt_config =================== [23:17:49] ===================== lmtt (1 subtest) ===================== [23:17:49] ======================== test_ops ========================= [23:17:49] [PASSED] 2-level [23:17:49] [PASSED] multi-level [23:17:49] ==================== [PASSED] test_ops ===================== [23:17:49] ====================== [PASSED] lmtt ======================= [23:17:49] ================= sriov_packet (1 subtest) ================= [23:17:49] [PASSED] test_descriptor_init [23:17:49] ================== [PASSED] sriov_packet =================== [23:17:49] ================= pf_service (11 subtests) ================= [23:17:49] [PASSED] pf_negotiate_any [23:17:49] [PASSED] pf_negotiate_base_match [23:17:49] [PASSED] pf_negotiate_base_newer [23:17:49] [PASSED] pf_negotiate_base_next [23:17:49] [SKIPPED] pf_negotiate_base_older (no older minor) [23:17:49] [PASSED] pf_negotiate_base_prev [23:17:49] [PASSED] pf_negotiate_latest_match [23:17:49] [PASSED] pf_negotiate_latest_newer [23:17:49] [PASSED] pf_negotiate_latest_next [23:17:49] [SKIPPED] pf_negotiate_latest_older (no older minor) [23:17:49] [SKIPPED] pf_negotiate_latest_prev (no prev major) [23:17:49] =================== [PASSED] pf_service ==================== [23:17:49] ================= xe_guc_g2g (2 subtests) ================== [23:17:49] ============== xe_live_guc_g2g_kunit_default ============== [23:17:49] ========= [SKIPPED] xe_live_guc_g2g_kunit_default ========== [23:17:49] ============== xe_live_guc_g2g_kunit_allmem =============== [23:17:49] ========== [SKIPPED] xe_live_guc_g2g_kunit_allmem ========== [23:17:49] =================== [SKIPPED] xe_guc_g2g =================== [23:17:49] =================== xe_mocs (2 subtests) =================== [23:17:49] ================ xe_live_mocs_kernel_kunit ================ [23:17:49] =========== [SKIPPED] xe_live_mocs_kernel_kunit ============ [23:17:49] ================ xe_live_mocs_reset_kunit ================= [23:17:49] ============ [SKIPPED] xe_live_mocs_reset_kunit ============ [23:17:49] ==================== [SKIPPED] xe_mocs ===================== [23:17:49] ================= xe_migrate (2 subtests) ================== [23:17:49] ================= xe_migrate_sanity_kunit ================= [23:17:49] ============ [SKIPPED] xe_migrate_sanity_kunit ============= [23:17:49] ================== xe_validate_ccs_kunit ================== [23:17:49] ============= [SKIPPED] xe_validate_ccs_kunit ============== [23:17:49] =================== [SKIPPED] xe_migrate =================== [23:17:49] ================== xe_dma_buf (1 subtest) ================== [23:17:49] ==================== xe_dma_buf_kunit ===================== [23:17:49] ================ [SKIPPED] xe_dma_buf_kunit ================ [23:17:49] =================== [SKIPPED] xe_dma_buf =================== [23:17:49] ================= xe_bo_shrink (1 subtest) ================= [23:17:49] =================== xe_bo_shrink_kunit ==================== [23:17:49] =============== [SKIPPED] xe_bo_shrink_kunit =============== [23:17:49] ================== [SKIPPED] xe_bo_shrink ================== [23:17:49] ==================== xe_bo (2 subtests) ==================== [23:17:49] ================== xe_ccs_migrate_kunit =================== [23:17:49] ============== [SKIPPED] xe_ccs_migrate_kunit ============== [23:17:49] ==================== xe_bo_evict_kunit ==================== [23:17:49] =============== [SKIPPED] xe_bo_evict_kunit ================ [23:17:49] ===================== [SKIPPED] xe_bo ====================== [23:17:49] ==================== args (13 subtests) ==================== [23:17:49] [PASSED] count_args_test [23:17:49] [PASSED] call_args_example [23:17:49] [PASSED] call_args_test [23:17:49] [PASSED] drop_first_arg_example [23:17:49] [PASSED] drop_first_arg_test [23:17:49] [PASSED] first_arg_example [23:17:49] [PASSED] first_arg_test [23:17:49] [PASSED] last_arg_example [23:17:49] [PASSED] last_arg_test [23:17:49] [PASSED] pick_arg_example [23:17:49] [PASSED] if_args_example [23:17:49] [PASSED] if_args_test [23:17:49] [PASSED] sep_comma_example [23:17:49] ====================== [PASSED] args ======================= [23:17:49] =================== xe_pci (3 subtests) ==================== [23:17:49] ==================== check_graphics_ip ==================== [23:17:49] [PASSED] 12.00 Xe_LP [23:17:49] [PASSED] 12.10 Xe_LP+ [23:17:49] [PASSED] 12.55 Xe_HPG [23:17:49] [PASSED] 12.60 Xe_HPC [23:17:49] [PASSED] 12.70 Xe_LPG [23:17:49] [PASSED] 12.71 Xe_LPG [23:17:49] [PASSED] 12.74 Xe_LPG+ [23:17:49] [PASSED] 20.01 Xe2_HPG [23:17:49] [PASSED] 20.02 Xe2_HPG [23:17:49] [PASSED] 20.04 Xe2_LPG [23:17:49] [PASSED] 30.00 Xe3_LPG [23:17:49] [PASSED] 30.01 Xe3_LPG [23:17:49] [PASSED] 30.03 Xe3_LPG [23:17:49] [PASSED] 30.04 Xe3_LPG [23:17:49] [PASSED] 30.05 Xe3_LPG [23:17:49] [PASSED] 35.10 Xe3p_LPG [23:17:49] [PASSED] 35.11 Xe3p_XPC [23:17:49] ================ [PASSED] check_graphics_ip ================ [23:17:49] ===================== check_media_ip ====================== [23:17:49] [PASSED] 12.00 Xe_M [23:17:49] [PASSED] 12.55 Xe_HPM [23:17:49] [PASSED] 13.00 Xe_LPM+ [23:17:49] [PASSED] 13.01 Xe2_HPM [23:17:49] [PASSED] 20.00 Xe2_LPM [23:17:49] [PASSED] 30.00 Xe3_LPM [23:17:49] [PASSED] 30.02 Xe3_LPM [23:17:49] [PASSED] 35.00 Xe3p_LPM [23:17:49] [PASSED] 35.03 Xe3p_HPM [23:17:49] ================= [PASSED] check_media_ip ================== [23:17:49] =================== check_platform_desc =================== [23:17:49] [PASSED] 0x9A60 (TIGERLAKE) [23:17:49] [PASSED] 0x9A68 (TIGERLAKE) [23:17:49] [PASSED] 0x9A70 (TIGERLAKE) [23:17:49] [PASSED] 0x9A40 (TIGERLAKE) [23:17:49] [PASSED] 0x9A49 (TIGERLAKE) [23:17:49] [PASSED] 0x9A59 (TIGERLAKE) [23:17:49] [PASSED] 0x9A78 (TIGERLAKE) [23:17:49] [PASSED] 0x9AC0 (TIGERLAKE) [23:17:49] [PASSED] 0x9AC9 (TIGERLAKE) [23:17:49] [PASSED] 0x9AD9 (TIGERLAKE) [23:17:49] [PASSED] 0x9AF8 (TIGERLAKE) [23:17:49] [PASSED] 0x4C80 (ROCKETLAKE) [23:17:49] [PASSED] 0x4C8A (ROCKETLAKE) [23:17:49] [PASSED] 0x4C8B (ROCKETLAKE) [23:17:49] [PASSED] 0x4C8C (ROCKETLAKE) [23:17:49] [PASSED] 0x4C90 (ROCKETLAKE) [23:17:49] [PASSED] 0x4C9A (ROCKETLAKE) [23:17:49] [PASSED] 0x4680 (ALDERLAKE_S) [23:17:49] [PASSED] 0x4682 (ALDERLAKE_S) [23:17:49] [PASSED] 0x4688 (ALDERLAKE_S) [23:17:49] [PASSED] 0x468A (ALDERLAKE_S) [23:17:49] [PASSED] 0x468B (ALDERLAKE_S) [23:17:49] [PASSED] 0x4690 (ALDERLAKE_S) [23:17:49] [PASSED] 0x4692 (ALDERLAKE_S) [23:17:49] [PASSED] 0x4693 (ALDERLAKE_S) [23:17:49] [PASSED] 0x46A0 (ALDERLAKE_P) [23:17:49] [PASSED] 0x46A1 (ALDERLAKE_P) [23:17:49] [PASSED] 0x46A2 (ALDERLAKE_P) [23:17:49] [PASSED] 0x46A3 (ALDERLAKE_P) [23:17:49] [PASSED] 0x46A6 (ALDERLAKE_P) [23:17:49] [PASSED] 0x46A8 (ALDERLAKE_P) [23:17:49] [PASSED] 0x46AA (ALDERLAKE_P) [23:17:49] [PASSED] 0x462A (ALDERLAKE_P) [23:17:49] [PASSED] 0x4626 (ALDERLAKE_P) [23:17:49] [PASSED] 0x4628 (ALDERLAKE_P) [23:17:49] [PASSED] 0x46B0 (ALDERLAKE_P) [23:17:49] [PASSED] 0x46B1 (ALDERLAKE_P) [23:17:49] [PASSED] 0x46B2 (ALDERLAKE_P) [23:17:49] [PASSED] 0x46B3 (ALDERLAKE_P) [23:17:49] [PASSED] 0x46C0 (ALDERLAKE_P) [23:17:49] [PASSED] 0x46C1 (ALDERLAKE_P) [23:17:49] [PASSED] 0x46C2 (ALDERLAKE_P) [23:17:49] [PASSED] 0x46C3 (ALDERLAKE_P) [23:17:49] [PASSED] 0x46D0 (ALDERLAKE_N) [23:17:49] [PASSED] 0x46D1 (ALDERLAKE_N) [23:17:49] [PASSED] 0x46D2 (ALDERLAKE_N) [23:17:49] [PASSED] 0x46D3 (ALDERLAKE_N) [23:17:49] [PASSED] 0x46D4 (ALDERLAKE_N) [23:17:49] [PASSED] 0xA721 (ALDERLAKE_P) [23:17:49] [PASSED] 0xA7A1 (ALDERLAKE_P) [23:17:49] [PASSED] 0xA7A9 (ALDERLAKE_P) [23:17:49] [PASSED] 0xA7AC (ALDERLAKE_P) [23:17:49] [PASSED] 0xA7AD (ALDERLAKE_P) [23:17:49] [PASSED] 0xA720 (ALDERLAKE_P) [23:17:49] [PASSED] 0xA7A0 (ALDERLAKE_P) [23:17:49] [PASSED] 0xA7A8 (ALDERLAKE_P) [23:17:49] [PASSED] 0xA7AA (ALDERLAKE_P) [23:17:49] [PASSED] 0xA7AB (ALDERLAKE_P) [23:17:49] [PASSED] 0xA780 (ALDERLAKE_S) [23:17:49] [PASSED] 0xA781 (ALDERLAKE_S) [23:17:49] [PASSED] 0xA782 (ALDERLAKE_S) [23:17:49] [PASSED] 0xA783 (ALDERLAKE_S) [23:17:49] [PASSED] 0xA788 (ALDERLAKE_S) [23:17:49] [PASSED] 0xA789 (ALDERLAKE_S) [23:17:49] [PASSED] 0xA78A (ALDERLAKE_S) [23:17:49] [PASSED] 0xA78B (ALDERLAKE_S) [23:17:49] [PASSED] 0x4905 (DG1) [23:17:49] [PASSED] 0x4906 (DG1) [23:17:49] [PASSED] 0x4907 (DG1) [23:17:49] [PASSED] 0x4908 (DG1) [23:17:49] [PASSED] 0x4909 (DG1) [23:17:49] [PASSED] 0x56C0 (DG2) [23:17:49] [PASSED] 0x56C2 (DG2) [23:17:49] [PASSED] 0x56C1 (DG2) [23:17:49] [PASSED] 0x7D51 (METEORLAKE) [23:17:49] [PASSED] 0x7DD1 (METEORLAKE) [23:17:49] [PASSED] 0x7D41 (METEORLAKE) [23:17:49] [PASSED] 0x7D67 (METEORLAKE) [23:17:49] [PASSED] 0xB640 (METEORLAKE) [23:17:49] [PASSED] 0x56A0 (DG2) [23:17:49] [PASSED] 0x56A1 (DG2) [23:17:49] [PASSED] 0x56A2 (DG2) [23:17:49] [PASSED] 0x56BE (DG2) [23:17:49] [PASSED] 0x56BF (DG2) [23:17:49] [PASSED] 0x5690 (DG2) [23:17:49] [PASSED] 0x5691 (DG2) [23:17:49] [PASSED] 0x5692 (DG2) [23:17:49] [PASSED] 0x56A5 (DG2) [23:17:49] [PASSED] 0x56A6 (DG2) [23:17:49] [PASSED] 0x56B0 (DG2) [23:17:49] [PASSED] 0x56B1 (DG2) [23:17:49] [PASSED] 0x56BA (DG2) [23:17:49] [PASSED] 0x56BB (DG2) [23:17:49] [PASSED] 0x56BC (DG2) [23:17:49] [PASSED] 0x56BD (DG2) [23:17:49] [PASSED] 0x5693 (DG2) [23:17:49] [PASSED] 0x5694 (DG2) [23:17:49] [PASSED] 0x5695 (DG2) [23:17:49] [PASSED] 0x56A3 (DG2) [23:17:49] [PASSED] 0x56A4 (DG2) [23:17:49] [PASSED] 0x56B2 (DG2) [23:17:49] [PASSED] 0x56B3 (DG2) [23:17:49] [PASSED] 0x5696 (DG2) [23:17:49] [PASSED] 0x5697 (DG2) [23:17:49] [PASSED] 0xB69 (PVC) [23:17:49] [PASSED] 0xB6E (PVC) [23:17:49] [PASSED] 0xBD4 (PVC) [23:17:49] [PASSED] 0xBD5 (PVC) [23:17:49] [PASSED] 0xBD6 (PVC) [23:17:49] [PASSED] 0xBD7 (PVC) [23:17:49] [PASSED] 0xBD8 (PVC) [23:17:49] [PASSED] 0xBD9 (PVC) [23:17:49] [PASSED] 0xBDA (PVC) [23:17:49] [PASSED] 0xBDB (PVC) [23:17:49] [PASSED] 0xBE0 (PVC) [23:17:49] [PASSED] 0xBE1 (PVC) [23:17:49] [PASSED] 0xBE5 (PVC) [23:17:49] [PASSED] 0x7D40 (METEORLAKE) [23:17:49] [PASSED] 0x7D45 (METEORLAKE) [23:17:49] [PASSED] 0x7D55 (METEORLAKE) [23:17:49] [PASSED] 0x7D60 (METEORLAKE) [23:17:49] [PASSED] 0x7DD5 (METEORLAKE) [23:17:49] [PASSED] 0x6420 (LUNARLAKE) [23:17:49] [PASSED] 0x64A0 (LUNARLAKE) [23:17:49] [PASSED] 0x64B0 (LUNARLAKE) [23:17:49] [PASSED] 0xE202 (BATTLEMAGE) [23:17:49] [PASSED] 0xE209 (BATTLEMAGE) [23:17:49] [PASSED] 0xE20B (BATTLEMAGE) [23:17:49] [PASSED] 0xE20C (BATTLEMAGE) [23:17:49] [PASSED] 0xE20D (BATTLEMAGE) [23:17:49] [PASSED] 0xE210 (BATTLEMAGE) [23:17:49] [PASSED] 0xE211 (BATTLEMAGE) [23:17:49] [PASSED] 0xE212 (BATTLEMAGE) [23:17:49] [PASSED] 0xE216 (BATTLEMAGE) [23:17:49] [PASSED] 0xE220 (BATTLEMAGE) [23:17:49] [PASSED] 0xE221 (BATTLEMAGE) [23:17:49] [PASSED] 0xE222 (BATTLEMAGE) [23:17:49] [PASSED] 0xE223 (BATTLEMAGE) [23:17:49] [PASSED] 0xB080 (PANTHERLAKE) [23:17:49] [PASSED] 0xB081 (PANTHERLAKE) [23:17:49] [PASSED] 0xB082 (PANTHERLAKE) [23:17:49] [PASSED] 0xB083 (PANTHERLAKE) [23:17:49] [PASSED] 0xB084 (PANTHERLAKE) [23:17:49] [PASSED] 0xB085 (PANTHERLAKE) [23:17:49] [PASSED] 0xB086 (PANTHERLAKE) [23:17:49] [PASSED] 0xB087 (PANTHERLAKE) [23:17:49] [PASSED] 0xB08F (PANTHERLAKE) [23:17:49] [PASSED] 0xB090 (PANTHERLAKE) [23:17:49] [PASSED] 0xB0A0 (PANTHERLAKE) [23:17:49] [PASSED] 0xB0B0 (PANTHERLAKE) [23:17:49] [PASSED] 0xFD80 (PANTHERLAKE) [23:17:49] [PASSED] 0xFD81 (PANTHERLAKE) [23:17:49] [PASSED] 0xD740 (NOVALAKE_S) [23:17:49] [PASSED] 0xD741 (NOVALAKE_S) [23:17:49] [PASSED] 0xD742 (NOVALAKE_S) [23:17:49] [PASSED] 0xD743 (NOVALAKE_S) [23:17:49] [PASSED] 0xD745 (NOVALAKE_S) [23:17:49] [PASSED] 0xD74A (NOVALAKE_S) [23:17:49] [PASSED] 0xD74B (NOVALAKE_S) [23:17:49] [PASSED] 0x674C (CRESCENTISLAND) [23:17:49] [PASSED] 0x674D (CRESCENTISLAND) [23:17:49] [PASSED] 0x674E (CRESCENTISLAND) [23:17:49] [PASSED] 0x674F (CRESCENTISLAND) [23:17:49] [PASSED] 0x6750 (CRESCENTISLAND) [23:17:49] [PASSED] 0xD750 (NOVALAKE_P) [23:17:49] [PASSED] 0xD751 (NOVALAKE_P) [23:17:49] [PASSED] 0xD752 (NOVALAKE_P) [23:17:49] [PASSED] 0xD753 (NOVALAKE_P) [23:17:49] [PASSED] 0xD754 (NOVALAKE_P) [23:17:49] [PASSED] 0xD755 (NOVALAKE_P) [23:17:49] [PASSED] 0xD756 (NOVALAKE_P) [23:17:49] [PASSED] 0xD757 (NOVALAKE_P) [23:17:49] [PASSED] 0xD75F (NOVALAKE_P) [23:17:49] =============== [PASSED] check_platform_desc =============== [23:17:49] ===================== [PASSED] xe_pci ====================== [23:17:49] ============= xe_rtp_tables_test (5 subtests) ============== [23:17:49] ================== xe_rtp_table_gt_test =================== [23:17:49] [PASSED] gt_was/14011060649 [23:17:49] [PASSED] gt_was/14011059788 [23:17:49] [PASSED] gt_was/14015795083 [23:17:49] [PASSED] gt_was/16021867713 [23:17:49] [PASSED] gt_was/14019449301 [23:17:49] [PASSED] gt_was/16028005424 [23:17:49] [PASSED] gt_was/14026578760 [23:17:49] [PASSED] gt_was/1409420604 [23:17:49] [PASSED] gt_was/1408615072 [23:17:49] [PASSED] gt_was/22010523718 [23:17:49] [PASSED] gt_was/14011006942 [23:17:49] [PASSED] gt_was/14014830051 [23:17:49] [PASSED] gt_was/18018781329 [23:17:49] [PASSED] gt_was/1509235366 [23:17:49] [PASSED] gt_was/18018781329 [23:17:49] [PASSED] gt_was/16016694945 [23:17:49] [PASSED] gt_was/14018575942 [23:17:49] [PASSED] gt_was/22016670082 [23:17:49] [PASSED] gt_was/22016670082 [23:17:49] [PASSED] gt_was/14017421178 [23:17:49] [PASSED] gt_was/16025250150 [23:17:49] [PASSED] gt_was/14021871409 [23:17:49] [PASSED] gt_was/16021865536 [23:17:49] [PASSED] gt_was/14021486841 [23:17:49] [PASSED] gt_was/14025160223 [23:17:49] [PASSED] gt_was/14026144927, 16029437861, 14026127056 [23:17:49] [PASSED] gt_was/14025635424 [23:17:49] [PASSED] gt_was/16028005424 [23:17:49] ============== [PASSED] xe_rtp_table_gt_test =============== [23:17:49] ================== xe_rtp_table_gt_test =================== [23:17:49] [PASSED] gt_tunings/Tuning: Blend Fill Caching Optimization Disable [23:17:49] [PASSED] gt_tunings/Tuning: 32B Access Enable [23:17:49] [PASSED] gt_tunings/Tuning: L3 cache [23:17:49] [PASSED] gt_tunings/Tuning: L3 cache - media [23:17:49] [PASSED] gt_tunings/Tuning: Compression Overfetch [23:17:49] [PASSED] gt_tunings/Tuning: Compression Overfetch - media [23:17:49] [PASSED] gt_tunings/Tuning: Enable compressible partial write overfetch in L3 [23:17:49] [PASSED] gt_tunings/Tuning: Enable compressible partial write overfetch in L3 - media [23:17:49] [PASSED] gt_tunings/Tuning: L2 Overfetch Compressible Only [23:17:49] [PASSED] gt_tunings/Tuning: L2 Overfetch Compressible Only - media [23:17:49] [PASSED] gt_tunings/Tuning: Stateless compression control [23:17:49] [PASSED] gt_tunings/Tuning: Stateless compression control - media [23:17:49] [PASSED] gt_tunings/Tuning: L3 RW flush all Cache [23:17:49] [PASSED] gt_tunings/Tuning: L3 RW flush all cache - media [23:17:49] [PASSED] gt_tunings/Tuning: Set STLB Bank Hash Mode to 4KB [23:17:49] ============== [PASSED] xe_rtp_table_gt_test =============== [23:17:49] ================== xe_rtp_table_oob_test ================== [23:17:49] [PASSED] oob_was/1607983814 [23:17:49] [PASSED] oob_was/16010904313 [23:17:49] [PASSED] oob_was/18022495364 [23:17:49] [PASSED] oob_was/22012773006 [23:17:49] [PASSED] oob_was/14014475959 [23:17:49] [PASSED] oob_was/22011391025 [23:17:49] [PASSED] oob_was/22012727170 [23:17:49] [PASSED] oob_was/22012727685 [23:17:49] [PASSED] oob_was/22016596838 [23:17:49] [PASSED] oob_was/18020744125 [23:17:49] [PASSED] oob_was/1409600907 [23:17:49] [PASSED] oob_was/22014953428 [23:17:49] [PASSED] oob_was/16017236439 [23:17:49] [PASSED] oob_was/14019821291 [23:17:49] [PASSED] oob_was/14015076503 [23:17:49] [PASSED] oob_was/14018913170 [23:17:49] [PASSED] oob_was/14018094691 [23:17:49] [PASSED] oob_was/18024947630 [23:17:49] [PASSED] oob_was/16022287689 [23:17:49] [PASSED] oob_was/13011645652 [23:17:49] [PASSED] oob_was/14022293748 [23:17:49] [PASSED] oob_was/22019794406 [23:17:49] [PASSED] oob_was/22019338487 [23:17:49] [PASSED] oob_was/16023588340 [23:17:49] [PASSED] oob_was/14019789679 [23:17:49] [PASSED] oob_was/14022866841 [23:17:49] [PASSED] oob_was/16021333562 [23:17:49] [PASSED] oob_was/14016712196 [23:17:49] [PASSED] oob_was/14015568240 [23:17:49] [PASSED] oob_was/18013179988 [23:17:49] [PASSED] oob_was/1508761755 [23:17:49] [PASSED] oob_was/16023105232 [23:17:49] [PASSED] oob_was/16026508708 [23:17:49] [PASSED] oob_was/14020001231 [23:17:49] [PASSED] oob_was/16023683509 [23:17:49] [PASSED] oob_was/14025515070 [23:17:49] [PASSED] oob_was/15015404425_disable [23:17:49] [PASSED] oob_was/16026007364 [23:17:49] [PASSED] oob_was/14020316580 [23:17:49] [PASSED] oob_was/14025883347 [23:17:49] [PASSED] oob_was/16029380221 [23:17:49] [PASSED] oob_was/22022079272 [23:17:49] [PASSED] oob_was/16029897822 [23:17:49] [PASSED] oob_was/14027054324 [23:17:49] ============== [PASSED] xe_rtp_table_oob_test ============== [23:17:49] ================ xe_rtp_table_dev_oob_test ================ [23:17:49] [PASSED] device_oob_was/22010954014 [23:17:49] [PASSED] device_oob_was/15015404425 [23:17:49] [PASSED] device_oob_was/22019338487_display [23:17:49] [PASSED] device_oob_was/14022085890 [23:17:49] [PASSED] device_oob_was/14026539277 [23:17:49] [PASSED] device_oob_was/14026633728 [23:17:49] [PASSED] device_oob_was/14026746987 [23:17:49] [PASSED] device_oob_was/14026779378 [23:17:49] ============ [PASSED] xe_rtp_table_dev_oob_test ============ [23:17:49] ========== xe_rtp_table_missing_upper_bound_test ========== [23:17:49] [PASSED] register_whitelist/WaAllowPMDepthAndInvocationCountAccessFromUMD, 1408556865 [23:17:49] [PASSED] register_whitelist/1508744258, 14012131227, 1808121037 [23:17:49] [PASSED] register_whitelist/1806527549 [23:17:49] [PASSED] register_whitelist/allow_read_ctx_timestamp [23:17:49] [PASSED] register_whitelist/allow_read_queue_timestamp [23:17:49] [PASSED] register_whitelist/16014440446 [23:17:49] [PASSED] register_whitelist/16017236439 [23:17:49] [PASSED] register_whitelist/16020183090 [23:17:49] [PASSED] register_whitelist/14024997852 [23:17:49] [PASSED] register_whitelist/14024997852 [23:17:49] ====== [PASSED] xe_rtp_table_missing_upper_bound_test ====== [23:17:49] =============== [PASSED] xe_rtp_tables_test ================ [23:17:49] =================== xe_rtp (3 subtests) ==================== [23:17:49] =================== xe_rtp_rules_tests ==================== [23:17:49] [PASSED] no [23:17:49] [PASSED] yes [23:17:49] [PASSED] no-and-no [23:17:49] [PASSED] no-and-yes [23:17:49] [PASSED] yes-and-no [23:17:49] [PASSED] yes-and-yes [23:17:49] [PASSED] no-or-no [23:17:49] [PASSED] no-or-yes [23:17:49] [PASSED] yes-or-no [23:17:49] [PASSED] yes-or-yes [23:17:49] [PASSED] no-yes-or-yes-no [23:17:49] [PASSED] no-yes-or-yes-yes [23:17:49] [PASSED] yes-yes-or-no-yes [23:17:49] [PASSED] yes-yes-or-yes-yes [23:17:49] [PASSED] no-no-or-yes-or-no [23:17:49] [PASSED] or [23:17:49] [PASSED] or-yes [23:17:49] [PASSED] or-no [23:17:49] [PASSED] yes-or [23:17:49] [PASSED] no-or [23:17:49] [PASSED] no-or-or-yes [23:17:49] [PASSED] yes-or-or-no [23:17:49] [PASSED] no-or-or-no [23:17:49] [PASSED] missing-context-engine-class [23:17:49] [PASSED] missing-context-engine-class-or-yes [23:17:49] [PASSED] missing-context-engine-class-or-or-yes [23:17:49] =============== [PASSED] xe_rtp_rules_tests ================ [23:17:49] =============== xe_rtp_process_to_sr_tests ================ [23:17:49] [PASSED] coalesce-same-reg [23:17:49] [PASSED] coalesce-same-reg-literal-and-func [23:17:49] [PASSED] no-match-no-add [23:17:49] [PASSED] two-regs-two-entries [23:17:49] [PASSED] clr-one-set-other [23:17:49] [PASSED] set-field [23:17:49] [PASSED] conflict-duplicate [23:17:49] [PASSED] conflict-not-disjoint [23:17:49] [PASSED] conflict-not-disjoint-literal-and-func [23:17:49] [PASSED] conflict-reg-type [23:17:49] [PASSED] bad-mcr-reg-forced-to-regular [23:17:49] [PASSED] bad-regular-reg-forced-to-mcr [23:17:49] =========== [PASSED] xe_rtp_process_to_sr_tests ============ [23:17:49] ================== xe_rtp_process_tests =================== [23:17:49] [PASSED] active1 [23:17:49] [PASSED] active2 [23:17:49] [PASSED] active-inactive [23:17:49] [PASSED] inactive-active [23:17:49] [PASSED] inactive-active-inactive [23:17:49] [PASSED] inactive-inactive-inactive [23:17:49] ============== [PASSED] xe_rtp_process_tests =============== [23:17:49] ===================== [PASSED] xe_rtp ====================== [23:17:49] ==================== xe_wa (1 subtest) ===================== [23:17:49] ======================== xe_wa_gt ========================= [23:17:49] [PASSED] TIGERLAKE B0 [23:17:49] [PASSED] DG1 A0 [23:17:49] [PASSED] DG1 B0 [23:17:49] [PASSED] ALDERLAKE_S A0 [23:17:49] [PASSED] ALDERLAKE_S B0 [23:17:49] [PASSED] ALDERLAKE_S C0 [23:17:49] [PASSED] ALDERLAKE_S D0 [23:17:49] [PASSED] ALDERLAKE_P A0 [23:17:49] [PASSED] ALDERLAKE_P B0 [23:17:49] [PASSED] ALDERLAKE_P C0 [23:17:49] [PASSED] ALDERLAKE_S RPLS D0 [23:17:49] [PASSED] ALDERLAKE_P RPLU E0 [23:17:49] [PASSED] DG2 G10 C0 [23:17:49] [PASSED] DG2 G11 B1 [23:17:49] [PASSED] DG2 G12 A1 [23:17:49] [PASSED] METEORLAKE 12.70(Xe_LPG) A0 13.00(Xe_LPM+) A0 [23:17:49] [PASSED] METEORLAKE 12.71(Xe_LPG) A0 13.00(Xe_LPM+) A0 [23:17:49] [PASSED] METEORLAKE 12.74(Xe_LPG+) A0 13.00(Xe_LPM+) A0 [23:17:49] [PASSED] LUNARLAKE 20.04(Xe2_LPG) A0 20.00(Xe2_LPM) A0 [23:17:49] [PASSED] LUNARLAKE 20.04(Xe2_LPG) B0 20.00(Xe2_LPM) A0 [23:17:49] [PASSED] BATTLEMAGE 20.01(Xe2_HPG) A0 13.01(Xe2_HPM) A1 [23:17:49] [PASSED] PANTHERLAKE 30.00(Xe3_LPG) A0 30.00(Xe3_LPM) A0 [23:17:49] ==================== [PASSED] xe_wa_gt ===================== [23:17:49] ====================== [PASSED] xe_wa ====================== [23:17:49] ============================================================ [23:17:49] Testing complete. Ran 742 tests: passed: 724, skipped: 18 [23:17:49] Elapsed time: 36.715s total, 4.429s configuring, 31.620s building, 0.629s running
+ /kernel/tools/testing/kunit/kunit.py run --kunitconfig /kernel/drivers/gpu/drm/tests/.kunitconfig [23:17:49] Configuring KUnit Kernel ...
Regenerating .config ...
Populating config with:
$ make ARCH=um O=.kunit olddefconfig [23:17:51] Building KUnit Kernel ... Populating config with: $ make ARCH=um O=.kunit olddefconfig Building with: $ make all compile_commands.json scripts_gdb ARCH=um O=.kunit --jobs=48 [23:18:16] Starting KUnit Kernel (1/1)... [23:18:16] ============================================================ Running tests with: $ .kunit/linux kunit.enable=1 mem=1G console=tty kunit_shutdown=halt [23:18:16] ============ drm_test_pick_cmdline (2 subtests) ============ [23:18:16] [PASSED] drm_test_pick_cmdline_res_1920_1080_60 [23:18:16] =============== drm_test_pick_cmdline_named =============== [23:18:16] [PASSED] NTSC [23:18:16] [PASSED] NTSC-J [23:18:16] [PASSED] PAL [23:18:16] [PASSED] PAL-M [23:18:16] =========== [PASSED] drm_test_pick_cmdline_named =========== [23:18:16] ============== [PASSED] drm_test_pick_cmdline ============== [23:18:16] == drm_test_atomic_get_connector_for_encoder (1 subtest) === [23:18:16] [PASSED] drm_test_drm_atomic_get_connector_for_encoder [23:18:16] ==== [PASSED] drm_test_atomic_get_connector_for_encoder ==== [23:18:16] =========== drm_validate_clone_mode (2 subtests) =========== [23:18:16] ============== drm_test_check_in_clone_mode =============== [23:18:16] [PASSED] in_clone_mode [23:18:16] [PASSED] not_in_clone_mode [23:18:16] ========== [PASSED] drm_test_check_in_clone_mode =========== [23:18:16] =============== drm_test_check_valid_clones =============== [23:18:16] [PASSED] not_in_clone_mode [23:18:16] [PASSED] valid_clone [23:18:16] [PASSED] invalid_clone [23:18:16] =========== [PASSED] drm_test_check_valid_clones =========== [23:18:16] ============= [PASSED] drm_validate_clone_mode ============= [23:18:16] ============= drm_validate_modeset (1 subtest) ============= [23:18:16] [PASSED] drm_test_check_connector_changed_modeset [23:18:16] ============== [PASSED] drm_validate_modeset =============== [23:18:16] ====== drm_test_bridge_get_current_state (1 subtest) ======= [23:18:16] [PASSED] drm_test_drm_bridge_get_current_state_atomic [23:18:16] ======== [PASSED] drm_test_bridge_get_current_state ======== [23:18:16] ====== drm_test_bridge_helper_reset_crtc (3 subtests) ====== [23:18:16] [PASSED] drm_test_drm_bridge_helper_reset_crtc_atomic [23:18:16] [PASSED] drm_test_drm_bridge_helper_reset_crtc_atomic_disabled [23:18:16] [PASSED] drm_test_drm_bridge_helper_hdmi_output_bus_fmts [23:18:16] ======== [PASSED] drm_test_bridge_helper_reset_crtc ======== [23:18:16] ============== drm_bridge_alloc (2 subtests) =============== [23:18:16] [PASSED] drm_test_drm_bridge_alloc_basic [23:18:16] [PASSED] drm_test_drm_bridge_alloc_get_put [23:18:16] ================ [PASSED] drm_bridge_alloc ================= [23:18:16] ============= drm_bridge_bus_fmt (5 subtests) ============== [23:18:16] [PASSED] drm_test_bridge_rgb_yuv_rgb [23:18:16] [PASSED] drm_test_bridge_must_convert_to_yuv444 [23:18:16] [PASSED] drm_test_bridge_hdmi_auto_rgb [23:18:16] [PASSED] drm_test_bridge_auto_first [23:18:16] [PASSED] drm_test_bridge_rgb_yuv_no_path [23:18:16] =============== [PASSED] drm_bridge_bus_fmt ================ [23:18:16] ============= drm_cmdline_parser (40 subtests) ============= [23:18:16] [PASSED] drm_test_cmdline_force_d_only [23:18:16] [PASSED] drm_test_cmdline_force_D_only_dvi [23:18:16] [PASSED] drm_test_cmdline_force_D_only_hdmi [23:18:16] [PASSED] drm_test_cmdline_force_D_only_not_digital [23:18:16] [PASSED] drm_test_cmdline_force_e_only [23:18:16] [PASSED] drm_test_cmdline_res [23:18:16] [PASSED] drm_test_cmdline_res_vesa [23:18:16] [PASSED] drm_test_cmdline_res_vesa_rblank [23:18:16] [PASSED] drm_test_cmdline_res_rblank [23:18:16] [PASSED] drm_test_cmdline_res_bpp [23:18:16] [PASSED] drm_test_cmdline_res_refresh [23:18:16] [PASSED] drm_test_cmdline_res_bpp_refresh [23:18:16] [PASSED] drm_test_cmdline_res_bpp_refresh_interlaced [23:18:16] [PASSED] drm_test_cmdline_res_bpp_refresh_margins [23:18:16] [PASSED] drm_test_cmdline_res_bpp_refresh_force_off [23:18:16] [PASSED] drm_test_cmdline_res_bpp_refresh_force_on [23:18:16] [PASSED] drm_test_cmdline_res_bpp_refresh_force_on_analog [23:18:16] [PASSED] drm_test_cmdline_res_bpp_refresh_force_on_digital [23:18:16] [PASSED] drm_test_cmdline_res_bpp_refresh_interlaced_margins_force_on [23:18:16] [PASSED] drm_test_cmdline_res_margins_force_on [23:18:16] [PASSED] drm_test_cmdline_res_vesa_margins [23:18:16] [PASSED] drm_test_cmdline_name [23:18:16] [PASSED] drm_test_cmdline_name_bpp [23:18:16] [PASSED] drm_test_cmdline_name_option [23:18:16] [PASSED] drm_test_cmdline_name_bpp_option [23:18:16] [PASSED] drm_test_cmdline_rotate_0 [23:18:16] [PASSED] drm_test_cmdline_rotate_90 [23:18:16] [PASSED] drm_test_cmdline_rotate_180 [23:18:16] [PASSED] drm_test_cmdline_rotate_270 [23:18:16] [PASSED] drm_test_cmdline_hmirror [23:18:16] [PASSED] drm_test_cmdline_vmirror [23:18:16] [PASSED] drm_test_cmdline_margin_options [23:18:16] [PASSED] drm_test_cmdline_multiple_options [23:18:16] [PASSED] drm_test_cmdline_bpp_extra_and_option [23:18:16] [PASSED] drm_test_cmdline_extra_and_option [23:18:16] [PASSED] drm_test_cmdline_freestanding_options [23:18:16] [PASSED] drm_test_cmdline_freestanding_force_e_and_options [23:18:16] [PASSED] drm_test_cmdline_panel_orientation [23:18:16] ================ drm_test_cmdline_invalid ================= [23:18:16] [PASSED] margin_only [23:18:16] [PASSED] interlace_only [23:18:16] [PASSED] res_missing_x [23:18:16] [PASSED] res_missing_y [23:18:16] [PASSED] res_bad_y [23:18:16] [PASSED] res_missing_y_bpp [23:18:16] [PASSED] res_bad_bpp [23:18:16] [PASSED] res_bad_refresh [23:18:16] [PASSED] res_bpp_refresh_force_on_off [23:18:16] [PASSED] res_invalid_mode [23:18:16] [PASSED] res_bpp_wrong_place_mode [23:18:16] [PASSED] name_bpp_refresh [23:18:16] [PASSED] name_refresh [23:18:16] [PASSED] name_refresh_wrong_mode [23:18:16] [PASSED] name_refresh_invalid_mode [23:18:16] [PASSED] rotate_multiple [23:18:16] [PASSED] rotate_invalid_val [23:18:16] [PASSED] rotate_truncated [23:18:16] [PASSED] invalid_option [23:18:16] [PASSED] invalid_tv_option [23:18:16] [PASSED] truncated_tv_option [23:18:16] ============ [PASSED] drm_test_cmdline_invalid ============= [23:18:16] =============== drm_test_cmdline_tv_options =============== [23:18:16] [PASSED] NTSC [23:18:16] [PASSED] NTSC_443 [23:18:16] [PASSED] NTSC_J [23:18:16] [PASSED] PAL [23:18:16] [PASSED] PAL_M [23:18:16] [PASSED] PAL_N [23:18:16] [PASSED] SECAM [23:18:16] [PASSED] MONO_525 [23:18:16] [PASSED] MONO_625 [23:18:16] =========== [PASSED] drm_test_cmdline_tv_options =========== [23:18:16] =============== [PASSED] drm_cmdline_parser ================ [23:18:16] ========== drmm_connector_hdmi_init (20 subtests) ========== [23:18:16] [PASSED] drm_test_connector_hdmi_init_valid [23:18:16] [PASSED] drm_test_connector_hdmi_init_bpc_8 [23:18:16] [PASSED] drm_test_connector_hdmi_init_bpc_10 [23:18:16] [PASSED] drm_test_connector_hdmi_init_bpc_12 [23:18:16] [PASSED] drm_test_connector_hdmi_init_bpc_invalid [23:18:16] [PASSED] drm_test_connector_hdmi_init_bpc_null [23:18:16] [PASSED] drm_test_connector_hdmi_init_formats_empty [23:18:16] [PASSED] drm_test_connector_hdmi_init_formats_no_rgb [23:18:16] === drm_test_connector_hdmi_init_formats_yuv420_allowed === [23:18:16] [PASSED] supported_formats=0x9 yuv420_allowed=1 [23:18:16] [PASSED] supported_formats=0x9 yuv420_allowed=0 [23:18:16] [PASSED] supported_formats=0x5 yuv420_allowed=1 [23:18:16] [PASSED] supported_formats=0x5 yuv420_allowed=0 [23:18:16] === [PASSED] drm_test_connector_hdmi_init_formats_yuv420_allowed === [23:18:16] [PASSED] drm_test_connector_hdmi_init_null_ddc [23:18:16] [PASSED] drm_test_connector_hdmi_init_null_product [23:18:16] [PASSED] drm_test_connector_hdmi_init_null_vendor [23:18:16] [PASSED] drm_test_connector_hdmi_init_product_length_exact [23:18:16] [PASSED] drm_test_connector_hdmi_init_product_length_too_long [23:18:16] [PASSED] drm_test_connector_hdmi_init_product_valid [23:18:16] [PASSED] drm_test_connector_hdmi_init_vendor_length_exact [23:18:16] [PASSED] drm_test_connector_hdmi_init_vendor_length_too_long [23:18:16] [PASSED] drm_test_connector_hdmi_init_vendor_valid [23:18:16] ========= drm_test_connector_hdmi_init_type_valid ========= [23:18:16] [PASSED] HDMI-A [23:18:16] [PASSED] HDMI-B [23:18:16] ===== [PASSED] drm_test_connector_hdmi_init_type_valid ===== [23:18:16] ======== drm_test_connector_hdmi_init_type_invalid ======== [23:18:16] [PASSED] Unknown [23:18:16] [PASSED] VGA [23:18:16] [PASSED] DVI-I [23:18:16] [PASSED] DVI-D [23:18:16] [PASSED] DVI-A [23:18:16] [PASSED] Composite [23:18:16] [PASSED] SVIDEO [23:18:16] [PASSED] LVDS [23:18:16] [PASSED] Component [23:18:16] [PASSED] DIN [23:18:16] [PASSED] DP [23:18:16] [PASSED] TV [23:18:16] [PASSED] eDP [23:18:16] [PASSED] Virtual [23:18:16] [PASSED] DSI [23:18:16] [PASSED] DPI [23:18:16] [PASSED] Writeback [23:18:16] [PASSED] SPI [23:18:16] [PASSED] USB [23:18:16] ==== [PASSED] drm_test_connector_hdmi_init_type_invalid ==== [23:18:16] ============ [PASSED] drmm_connector_hdmi_init ============= [23:18:16] ============= drmm_connector_init (3 subtests) ============= [23:18:16] [PASSED] drm_test_drmm_connector_init [23:18:16] [PASSED] drm_test_drmm_connector_init_null_ddc [23:18:16] ========= drm_test_drmm_connector_init_type_valid ========= [23:18:16] [PASSED] Unknown [23:18:16] [PASSED] VGA [23:18:16] [PASSED] DVI-I [23:18:16] [PASSED] DVI-D [23:18:16] [PASSED] DVI-A [23:18:16] [PASSED] Composite [23:18:16] [PASSED] SVIDEO [23:18:16] [PASSED] LVDS [23:18:16] [PASSED] Component [23:18:16] [PASSED] DIN [23:18:16] [PASSED] DP [23:18:16] [PASSED] HDMI-A [23:18:16] [PASSED] HDMI-B [23:18:16] [PASSED] TV [23:18:16] [PASSED] eDP [23:18:16] [PASSED] Virtual [23:18:16] [PASSED] DSI [23:18:16] [PASSED] DPI [23:18:16] [PASSED] Writeback [23:18:16] [PASSED] SPI [23:18:16] [PASSED] USB [23:18:16] ===== [PASSED] drm_test_drmm_connector_init_type_valid ===== [23:18:16] =============== [PASSED] drmm_connector_init =============== [23:18:16] ========= drm_connector_dynamic_init (6 subtests) ========== [23:18:16] [PASSED] drm_test_drm_connector_dynamic_init [23:18:16] [PASSED] drm_test_drm_connector_dynamic_init_null_ddc [23:18:16] [PASSED] drm_test_drm_connector_dynamic_init_not_added [23:18:16] [PASSED] drm_test_drm_connector_dynamic_init_properties [23:18:16] ===== drm_test_drm_connector_dynamic_init_type_valid ====== [23:18:16] [PASSED] Unknown [23:18:16] [PASSED] VGA [23:18:16] [PASSED] DVI-I [23:18:16] [PASSED] DVI-D [23:18:16] [PASSED] DVI-A [23:18:16] [PASSED] Composite [23:18:16] [PASSED] SVIDEO [23:18:16] [PASSED] LVDS [23:18:16] [PASSED] Component [23:18:16] [PASSED] DIN [23:18:16] [PASSED] DP [23:18:16] [PASSED] HDMI-A [23:18:16] [PASSED] HDMI-B [23:18:16] [PASSED] TV [23:18:16] [PASSED] eDP [23:18:16] [PASSED] Virtual [23:18:16] [PASSED] DSI [23:18:16] [PASSED] DPI [23:18:16] [PASSED] Writeback [23:18:16] [PASSED] SPI [23:18:16] [PASSED] USB [23:18:16] = [PASSED] drm_test_drm_connector_dynamic_init_type_valid == [23:18:16] ======== drm_test_drm_connector_dynamic_init_name ========= [23:18:16] [PASSED] Unknown [23:18:16] [PASSED] VGA [23:18:16] [PASSED] DVI-I [23:18:16] [PASSED] DVI-D [23:18:16] [PASSED] DVI-A [23:18:16] [PASSED] Composite [23:18:16] [PASSED] SVIDEO [23:18:16] [PASSED] LVDS [23:18:16] [PASSED] Component [23:18:16] [PASSED] DIN [23:18:16] [PASSED] DP [23:18:16] [PASSED] HDMI-A [23:18:16] [PASSED] HDMI-B [23:18:16] [PASSED] TV [23:18:16] [PASSED] eDP [23:18:16] [PASSED] Virtual [23:18:16] [PASSED] DSI [23:18:16] [PASSED] DPI [23:18:16] [PASSED] Writeback [23:18:16] [PASSED] SPI [23:18:16] [PASSED] USB [23:18:16] ==== [PASSED] drm_test_drm_connector_dynamic_init_name ===== [23:18:16] =========== [PASSED] drm_connector_dynamic_init ============ [23:18:16] ==== drm_connector_dynamic_register_early (4 subtests) ===== [23:18:16] [PASSED] drm_test_drm_connector_dynamic_register_early_on_list [23:18:16] [PASSED] drm_test_drm_connector_dynamic_register_early_defer [23:18:16] [PASSED] drm_test_drm_connector_dynamic_register_early_no_init [23:18:16] [PASSED] drm_test_drm_connector_dynamic_register_early_no_mode_object [23:18:16] ====== [PASSED] drm_connector_dynamic_register_early ======= [23:18:16] ======= drm_connector_dynamic_register (7 subtests) ======== [23:18:16] [PASSED] drm_test_drm_connector_dynamic_register_on_list [23:18:16] [PASSED] drm_test_drm_connector_dynamic_register_no_defer [23:18:16] [PASSED] drm_test_drm_connector_dynamic_register_no_init [23:18:16] [PASSED] drm_test_drm_connector_dynamic_register_mode_object [23:18:16] [PASSED] drm_test_drm_connector_dynamic_register_sysfs [23:18:16] [PASSED] drm_test_drm_connector_dynamic_register_sysfs_name [23:18:16] [PASSED] drm_test_drm_connector_dynamic_register_debugfs [23:18:16] ========= [PASSED] drm_connector_dynamic_register ========== [23:18:16] = drm_connector_attach_broadcast_rgb_property (2 subtests) = [23:18:16] [PASSED] drm_test_drm_connector_attach_broadcast_rgb_property [23:18:16] [PASSED] drm_test_drm_connector_attach_broadcast_rgb_property_hdmi_connector [23:18:16] === [PASSED] drm_connector_attach_broadcast_rgb_property === [23:18:16] ========== drm_get_tv_mode_from_name (2 subtests) ========== [23:18:16] ========== drm_test_get_tv_mode_from_name_valid =========== [23:18:16] [PASSED] NTSC [23:18:16] [PASSED] NTSC-443 [23:18:16] [PASSED] NTSC-J [23:18:16] [PASSED] PAL [23:18:16] [PASSED] PAL-M [23:18:16] [PASSED] PAL-N [23:18:16] [PASSED] SECAM [23:18:16] [PASSED] Mono [23:18:16] ====== [PASSED] drm_test_get_tv_mode_from_name_valid ======= [23:18:16] [PASSED] drm_test_get_tv_mode_from_name_truncated [23:18:16] ============ [PASSED] drm_get_tv_mode_from_name ============ [23:18:16] = drm_test_connector_hdmi_compute_mode_clock (12 subtests) = [23:18:16] [PASSED] drm_test_drm_hdmi_compute_mode_clock_rgb [23:18:16] [PASSED] drm_test_drm_hdmi_compute_mode_clock_rgb_10bpc [23:18:16] [PASSED] drm_test_drm_hdmi_compute_mode_clock_rgb_10bpc_vic_1 [23:18:16] [PASSED] drm_test_drm_hdmi_compute_mode_clock_rgb_12bpc [23:18:16] [PASSED] drm_test_drm_hdmi_compute_mode_clock_rgb_12bpc_vic_1 [23:18:16] [PASSED] drm_test_drm_hdmi_compute_mode_clock_rgb_double [23:18:16] = drm_test_connector_hdmi_compute_mode_clock_yuv420_valid = [23:18:16] [PASSED] VIC 96 [23:18:16] [PASSED] VIC 97 [23:18:16] [PASSED] VIC 101 [23:18:16] [PASSED] VIC 102 [23:18:16] [PASSED] VIC 106 [23:18:16] [PASSED] VIC 107 [23:18:16] === [PASSED] drm_test_connector_hdmi_compute_mode_clock_yuv420_valid === [23:18:16] [PASSED] drm_test_connector_hdmi_compute_mode_clock_yuv420_10_bpc [23:18:16] [PASSED] drm_test_connector_hdmi_compute_mode_clock_yuv420_12_bpc [23:18:16] [PASSED] drm_test_connector_hdmi_compute_mode_clock_yuv422_8_bpc [23:18:16] [PASSED] drm_test_connector_hdmi_compute_mode_clock_yuv422_10_bpc [23:18:16] [PASSED] drm_test_connector_hdmi_compute_mode_clock_yuv422_12_bpc [23:18:16] === [PASSED] drm_test_connector_hdmi_compute_mode_clock ==== [23:18:16] == drm_hdmi_connector_get_broadcast_rgb_name (2 subtests) == [23:18:16] === drm_test_drm_hdmi_connector_get_broadcast_rgb_name ==== [23:18:16] [PASSED] Automatic [23:18:16] [PASSED] Full [23:18:16] [PASSED] Limited 16:235 [23:18:16] === [PASSED] drm_test_drm_hdmi_connector_get_broadcast_rgb_name === [23:18:16] [PASSED] drm_test_drm_hdmi_connector_get_broadcast_rgb_name_invalid [23:18:16] ==== [PASSED] drm_hdmi_connector_get_broadcast_rgb_name ==== [23:18:16] == drm_hdmi_connector_get_output_format_name (2 subtests) == [23:18:16] === drm_test_drm_hdmi_connector_get_output_format_name ==== [23:18:16] [PASSED] RGB [23:18:16] [PASSED] YUV 4:2:0 [23:18:16] [PASSED] YUV 4:2:2 [23:18:16] [PASSED] YUV 4:4:4 [23:18:16] === [PASSED] drm_test_drm_hdmi_connector_get_output_format_name === [23:18:16] [PASSED] drm_test_drm_hdmi_connector_get_output_format_name_invalid [23:18:16] ==== [PASSED] drm_hdmi_connector_get_output_format_name ==== [23:18:16] ============= drm_damage_helper (21 subtests) ============== [23:18:16] [PASSED] drm_test_damage_iter_no_damage [23:18:16] [PASSED] drm_test_damage_iter_no_damage_fractional_src [23:18:16] [PASSED] drm_test_damage_iter_no_damage_src_moved [23:18:16] [PASSED] drm_test_damage_iter_no_damage_fractional_src_moved [23:18:16] [PASSED] drm_test_damage_iter_no_damage_not_visible [23:18:16] [PASSED] drm_test_damage_iter_no_damage_no_crtc [23:18:16] [PASSED] drm_test_damage_iter_no_damage_no_fb [23:18:16] [PASSED] drm_test_damage_iter_simple_damage [23:18:16] [PASSED] drm_test_damage_iter_single_damage [23:18:16] [PASSED] drm_test_damage_iter_single_damage_intersect_src [23:18:16] [PASSED] drm_test_damage_iter_single_damage_outside_src [23:18:16] [PASSED] drm_test_damage_iter_single_damage_fractional_src [23:18:16] [PASSED] drm_test_damage_iter_single_damage_intersect_fractional_src [23:18:16] [PASSED] drm_test_damage_iter_single_damage_outside_fractional_src [23:18:16] [PASSED] drm_test_damage_iter_single_damage_src_moved [23:18:16] [PASSED] drm_test_damage_iter_single_damage_fractional_src_moved [23:18:16] [PASSED] drm_test_damage_iter_damage [23:18:16] [PASSED] drm_test_damage_iter_damage_one_intersect [23:18:16] [PASSED] drm_test_damage_iter_damage_one_outside [23:18:16] [PASSED] drm_test_damage_iter_damage_src_moved [23:18:16] [PASSED] drm_test_damage_iter_damage_not_visible [23:18:16] ================ [PASSED] drm_damage_helper ================ [23:18:16] ============== drm_dp_mst_helper (3 subtests) ============== [23:18:16] ============== drm_test_dp_mst_calc_pbn_mode ============== [23:18:16] [PASSED] Clock 154000 BPP 30 DSC disabled [23:18:16] [PASSED] Clock 234000 BPP 30 DSC disabled [23:18:16] [PASSED] Clock 297000 BPP 24 DSC disabled [23:18:16] [PASSED] Clock 332880 BPP 24 DSC enabled [23:18:16] [PASSED] Clock 324540 BPP 24 DSC enabled [23:18:16] ========== [PASSED] drm_test_dp_mst_calc_pbn_mode ========== [23:18:16] ============== drm_test_dp_mst_calc_pbn_div =============== [23:18:16] [PASSED] Link rate 2000000 lane count 4 [23:18:16] [PASSED] Link rate 2000000 lane count 2 [23:18:16] [PASSED] Link rate 2000000 lane count 1 [23:18:16] [PASSED] Link rate 1350000 lane count 4 [23:18:16] [PASSED] Link rate 1350000 lane count 2 [23:18:16] [PASSED] Link rate 1350000 lane count 1 [23:18:16] [PASSED] Link rate 1000000 lane count 4 [23:18:16] [PASSED] Link rate 1000000 lane count 2 [23:18:16] [PASSED] Link rate 1000000 lane count 1 [23:18:16] [PASSED] Link rate 810000 lane count 4 [23:18:16] [PASSED] Link rate 810000 lane count 2 [23:18:16] [PASSED] Link rate 810000 lane count 1 [23:18:16] [PASSED] Link rate 540000 lane count 4 [23:18:16] [PASSED] Link rate 540000 lane count 2 [23:18:16] [PASSED] Link rate 540000 lane count 1 [23:18:16] [PASSED] Link rate 270000 lane count 4 [23:18:16] [PASSED] Link rate 270000 lane count 2 [23:18:16] [PASSED] Link rate 270000 lane count 1 [23:18:16] [PASSED] Link rate 162000 lane count 4 [23:18:16] [PASSED] Link rate 162000 lane count 2 [23:18:16] [PASSED] Link rate 162000 lane count 1 [23:18:16] ========== [PASSED] drm_test_dp_mst_calc_pbn_div =========== [23:18:16] ========= drm_test_dp_mst_sideband_msg_req_decode ========= [23:18:16] [PASSED] DP_ENUM_PATH_RESOURCES with port number [23:18:16] [PASSED] DP_POWER_UP_PHY with port number [23:18:16] [PASSED] DP_POWER_DOWN_PHY with port number [23:18:16] [PASSED] DP_ALLOCATE_PAYLOAD with SDP stream sinks [23:18:16] [PASSED] DP_ALLOCATE_PAYLOAD with port number [23:18:16] [PASSED] DP_ALLOCATE_PAYLOAD with VCPI [23:18:16] [PASSED] DP_ALLOCATE_PAYLOAD with PBN [23:18:16] [PASSED] DP_QUERY_PAYLOAD with port number [23:18:16] [PASSED] DP_QUERY_PAYLOAD with VCPI [23:18:16] [PASSED] DP_REMOTE_DPCD_READ with port number [23:18:16] [PASSED] DP_REMOTE_DPCD_READ with DPCD address [23:18:16] [PASSED] DP_REMOTE_DPCD_READ with max number of bytes [23:18:16] [PASSED] DP_REMOTE_DPCD_WRITE with port number [23:18:16] [PASSED] DP_REMOTE_DPCD_WRITE with DPCD address [23:18:16] [PASSED] DP_REMOTE_DPCD_WRITE with data array [23:18:16] [PASSED] DP_REMOTE_I2C_READ with port number [23:18:16] [PASSED] DP_REMOTE_I2C_READ with I2C device ID [23:18:16] [PASSED] DP_REMOTE_I2C_READ with transactions array [23:18:16] [PASSED] DP_REMOTE_I2C_WRITE with port number [23:18:16] [PASSED] DP_REMOTE_I2C_WRITE with I2C device ID [23:18:16] [PASSED] DP_REMOTE_I2C_WRITE with data array [23:18:16] [PASSED] DP_QUERY_STREAM_ENC_STATUS with stream ID [23:18:16] [PASSED] DP_QUERY_STREAM_ENC_STATUS with client ID [23:18:16] [PASSED] DP_QUERY_STREAM_ENC_STATUS with stream event [23:18:16] [PASSED] DP_QUERY_STREAM_ENC_STATUS with valid stream event [23:18:16] [PASSED] DP_QUERY_STREAM_ENC_STATUS with stream behavior [23:18:16] [PASSED] DP_QUERY_STREAM_ENC_STATUS with a valid stream behavior [23:18:16] ===== [PASSED] drm_test_dp_mst_sideband_msg_req_decode ===== [23:18:16] ================ [PASSED] drm_dp_mst_helper ================ [23:18:16] ================== drm_exec (7 subtests) =================== [23:18:16] [PASSED] sanitycheck [23:18:16] [PASSED] test_lock [23:18:16] [PASSED] test_lock_unlock [23:18:16] [PASSED] test_duplicates [23:18:16] [PASSED] test_prepare [23:18:16] [PASSED] test_prepare_array [23:18:16] [PASSED] test_multiple_loops [23:18:16] ==================== [PASSED] drm_exec ===================== [23:18:16] =========== drm_format_helper_test (17 subtests) =========== [23:18:16] ============== drm_test_fb_xrgb8888_to_gray8 ============== [23:18:16] [PASSED] single_pixel_source_buffer [23:18:16] [PASSED] single_pixel_clip_rectangle [23:18:16] [PASSED] well_known_colors [23:18:16] [PASSED] destination_pitch [23:18:16] ========== [PASSED] drm_test_fb_xrgb8888_to_gray8 ========== [23:18:16] ============= drm_test_fb_xrgb8888_to_rgb332 ============== [23:18:16] [PASSED] single_pixel_source_buffer [23:18:16] [PASSED] single_pixel_clip_rectangle [23:18:16] [PASSED] well_known_colors [23:18:16] [PASSED] destination_pitch [23:18:16] ========= [PASSED] drm_test_fb_xrgb8888_to_rgb332 ========== [23:18:16] ============= drm_test_fb_xrgb8888_to_rgb565 ============== [23:18:16] [PASSED] single_pixel_source_buffer [23:18:16] [PASSED] single_pixel_clip_rectangle [23:18:16] [PASSED] well_known_colors [23:18:16] [PASSED] destination_pitch [23:18:16] ========= [PASSED] drm_test_fb_xrgb8888_to_rgb565 ========== [23:18:16] ============ drm_test_fb_xrgb8888_to_xrgb1555 ============= [23:18:16] [PASSED] single_pixel_source_buffer [23:18:16] [PASSED] single_pixel_clip_rectangle [23:18:16] [PASSED] well_known_colors [23:18:16] [PASSED] destination_pitch [23:18:16] ======== [PASSED] drm_test_fb_xrgb8888_to_xrgb1555 ========= [23:18:16] ============ drm_test_fb_xrgb8888_to_argb1555 ============= [23:18:16] [PASSED] single_pixel_source_buffer [23:18:16] [PASSED] single_pixel_clip_rectangle [23:18:16] [PASSED] well_known_colors [23:18:16] [PASSED] destination_pitch [23:18:16] ======== [PASSED] drm_test_fb_xrgb8888_to_argb1555 ========= [23:18:16] ============ drm_test_fb_xrgb8888_to_rgba5551 ============= [23:18:16] [PASSED] single_pixel_source_buffer [23:18:16] [PASSED] single_pixel_clip_rectangle [23:18:16] [PASSED] well_known_colors [23:18:16] [PASSED] destination_pitch [23:18:16] ======== [PASSED] drm_test_fb_xrgb8888_to_rgba5551 ========= [23:18:16] ============= drm_test_fb_xrgb8888_to_rgb888 ============== [23:18:16] [PASSED] single_pixel_source_buffer [23:18:16] [PASSED] single_pixel_clip_rectangle [23:18:16] [PASSED] well_known_colors [23:18:16] [PASSED] destination_pitch [23:18:16] ========= [PASSED] drm_test_fb_xrgb8888_to_rgb888 ========== [23:18:16] ============= drm_test_fb_xrgb8888_to_bgr888 ============== [23:18:16] [PASSED] single_pixel_source_buffer [23:18:16] [PASSED] single_pixel_clip_rectangle [23:18:16] [PASSED] well_known_colors [23:18:16] [PASSED] destination_pitch [23:18:16] ========= [PASSED] drm_test_fb_xrgb8888_to_bgr888 ========== [23:18:16] ============ drm_test_fb_xrgb8888_to_argb8888 ============= [23:18:16] [PASSED] single_pixel_source_buffer [23:18:16] [PASSED] single_pixel_clip_rectangle [23:18:16] [PASSED] well_known_colors [23:18:16] [PASSED] destination_pitch [23:18:16] ======== [PASSED] drm_test_fb_xrgb8888_to_argb8888 ========= [23:18:16] =========== drm_test_fb_xrgb8888_to_xrgb2101010 =========== [23:18:16] [PASSED] single_pixel_source_buffer [23:18:16] [PASSED] single_pixel_clip_rectangle [23:18:16] [PASSED] well_known_colors [23:18:16] [PASSED] destination_pitch [23:18:16] ======= [PASSED] drm_test_fb_xrgb8888_to_xrgb2101010 ======= [23:18:16] =========== drm_test_fb_xrgb8888_to_argb2101010 =========== [23:18:16] [PASSED] single_pixel_source_buffer [23:18:16] [PASSED] single_pixel_clip_rectangle [23:18:16] [PASSED] well_known_colors [23:18:16] [PASSED] destination_pitch [23:18:16] ======= [PASSED] drm_test_fb_xrgb8888_to_argb2101010 ======= [23:18:16] ============== drm_test_fb_xrgb8888_to_mono =============== [23:18:16] [PASSED] single_pixel_source_buffer [23:18:16] [PASSED] single_pixel_clip_rectangle [23:18:16] [PASSED] well_known_colors [23:18:16] [PASSED] destination_pitch [23:18:16] ========== [PASSED] drm_test_fb_xrgb8888_to_mono =========== [23:18:16] ==================== drm_test_fb_swab ===================== [23:18:16] [PASSED] single_pixel_source_buffer [23:18:16] [PASSED] single_pixel_clip_rectangle [23:18:16] [PASSED] well_known_colors [23:18:16] [PASSED] destination_pitch [23:18:16] ================ [PASSED] drm_test_fb_swab ================= [23:18:16] ============ drm_test_fb_xrgb8888_to_xbgr8888 ============= [23:18:16] [PASSED] single_pixel_source_buffer [23:18:16] [PASSED] single_pixel_clip_rectangle [23:18:16] [PASSED] well_known_colors [23:18:16] [PASSED] destination_pitch [23:18:16] ======== [PASSED] drm_test_fb_xrgb8888_to_xbgr8888 ========= [23:18:16] ============ drm_test_fb_xrgb8888_to_abgr8888 ============= [23:18:16] [PASSED] single_pixel_source_buffer [23:18:16] [PASSED] single_pixel_clip_rectangle [23:18:16] [PASSED] well_known_colors [23:18:16] [PASSED] destination_pitch [23:18:16] ======== [PASSED] drm_test_fb_xrgb8888_to_abgr8888 ========= [23:18:16] ================= drm_test_fb_clip_offset ================= [23:18:16] [PASSED] pass through [23:18:16] [PASSED] horizontal offset [23:18:16] [PASSED] vertical offset [23:18:16] [PASSED] horizontal and vertical offset [23:18:16] [PASSED] horizontal offset (custom pitch) [23:18:16] [PASSED] vertical offset (custom pitch) [23:18:16] [PASSED] horizontal and vertical offset (custom pitch) [23:18:16] ============= [PASSED] drm_test_fb_clip_offset ============= [23:18:16] =================== drm_test_fb_memcpy ==================== [23:18:16] [PASSED] single_pixel_source_buffer: XR24 little-endian (0x34325258) [23:18:16] [PASSED] single_pixel_source_buffer: XRA8 little-endian (0x38415258) [23:18:16] [PASSED] single_pixel_source_buffer: YU24 little-endian (0x34325559) [23:18:16] [PASSED] single_pixel_clip_rectangle: XB24 little-endian (0x34324258) [23:18:16] [PASSED] single_pixel_clip_rectangle: XRA8 little-endian (0x38415258) [23:18:16] [PASSED] single_pixel_clip_rectangle: YU24 little-endian (0x34325559) [23:18:16] [PASSED] well_known_colors: XB24 little-endian (0x34324258) [23:18:16] [PASSED] well_known_colors: XRA8 little-endian (0x38415258) [23:18:16] [PASSED] well_known_colors: YU24 little-endian (0x34325559) [23:18:16] [PASSED] destination_pitch: XB24 little-endian (0x34324258) [23:18:16] [PASSED] destination_pitch: XRA8 little-endian (0x38415258) [23:18:16] [PASSED] destination_pitch: YU24 little-endian (0x34325559) [23:18:16] =============== [PASSED] drm_test_fb_memcpy ================ [23:18:16] ============= [PASSED] drm_format_helper_test ============== [23:18:16] ================= drm_format (18 subtests) ================= [23:18:16] [PASSED] drm_test_format_block_width_invalid [23:18:16] [PASSED] drm_test_format_block_width_one_plane [23:18:16] [PASSED] drm_test_format_block_width_two_plane [23:18:16] [PASSED] drm_test_format_block_width_three_plane [23:18:16] [PASSED] drm_test_format_block_width_tiled [23:18:16] [PASSED] drm_test_format_block_height_invalid [23:18:16] [PASSED] drm_test_format_block_height_one_plane [23:18:16] [PASSED] drm_test_format_block_height_two_plane [23:18:16] [PASSED] drm_test_format_block_height_three_plane [23:18:16] [PASSED] drm_test_format_block_height_tiled [23:18:16] [PASSED] drm_test_format_min_pitch_invalid [23:18:16] [PASSED] drm_test_format_min_pitch_one_plane_8bpp [23:18:16] [PASSED] drm_test_format_min_pitch_one_plane_16bpp [23:18:16] [PASSED] drm_test_format_min_pitch_one_plane_24bpp [23:18:16] [PASSED] drm_test_format_min_pitch_one_plane_32bpp [23:18:16] [PASSED] drm_test_format_min_pitch_two_plane [23:18:16] [PASSED] drm_test_format_min_pitch_three_plane_8bpp [23:18:16] [PASSED] drm_test_format_min_pitch_tiled [23:18:16] =================== [PASSED] drm_format ==================== [23:18:16] ============== drm_framebuffer (10 subtests) =============== [23:18:16] ========== drm_test_framebuffer_check_src_coords ========== [23:18:16] [PASSED] Success: source fits into fb [23:18:16] [PASSED] Fail: overflowing fb with x-axis coordinate [23:18:16] [PASSED] Fail: overflowing fb with y-axis coordinate [23:18:16] [PASSED] Fail: overflowing fb with source width [23:18:16] [PASSED] Fail: overflowing fb with source height [23:18:16] ====== [PASSED] drm_test_framebuffer_check_src_coords ====== [23:18:16] [PASSED] drm_test_framebuffer_cleanup [23:18:16] =============== drm_test_framebuffer_create =============== [23:18:16] [PASSED] ABGR8888 normal sizes [23:18:16] [PASSED] ABGR8888 max sizes [23:18:16] [PASSED] ABGR8888 pitch greater than min required [23:18:16] [PASSED] ABGR8888 pitch less than min required [23:18:16] [PASSED] ABGR8888 Invalid width [23:18:16] [PASSED] ABGR8888 Invalid buffer handle [23:18:16] [PASSED] No pixel format [23:18:16] [PASSED] ABGR8888 Width 0 [23:18:16] [PASSED] ABGR8888 Height 0 [23:18:16] [PASSED] ABGR8888 Out of bound height * pitch combination [23:18:16] [PASSED] ABGR8888 Large buffer offset [23:18:16] [PASSED] ABGR8888 Buffer offset for inexistent plane [23:18:16] [PASSED] ABGR8888 Invalid flag [23:18:16] [PASSED] ABGR8888 Set DRM_MODE_FB_MODIFIERS without modifiers [23:18:16] [PASSED] ABGR8888 Valid buffer modifier [23:18:16] [PASSED] ABGR8888 Invalid buffer modifier(DRM_FORMAT_MOD_SAMSUNG_64_32_TILE) [23:18:16] [PASSED] ABGR8888 Extra pitches without DRM_MODE_FB_MODIFIERS [23:18:16] [PASSED] ABGR8888 Extra pitches with DRM_MODE_FB_MODIFIERS [23:18:16] [PASSED] NV12 Normal sizes [23:18:16] [PASSED] NV12 Max sizes [23:18:16] [PASSED] NV12 Invalid pitch [23:18:16] [PASSED] NV12 Invalid modifier/missing DRM_MODE_FB_MODIFIERS flag [23:18:16] [PASSED] NV12 different modifier per-plane [23:18:16] [PASSED] NV12 with DRM_FORMAT_MOD_SAMSUNG_64_32_TILE [23:18:16] [PASSED] NV12 Valid modifiers without DRM_MODE_FB_MODIFIERS [23:18:16] [PASSED] NV12 Modifier for inexistent plane [23:18:16] [PASSED] NV12 Handle for inexistent plane [23:18:16] [PASSED] NV12 Handle for inexistent plane without DRM_MODE_FB_MODIFIERS [23:18:16] [PASSED] YVU420 DRM_MODE_FB_MODIFIERS set without modifier [23:18:16] [PASSED] YVU420 Normal sizes [23:18:16] [PASSED] YVU420 Max sizes [23:18:16] [PASSED] YVU420 Invalid pitch [23:18:16] [PASSED] YVU420 Different pitches [23:18:16] [PASSED] YVU420 Different buffer offsets/pitches [23:18:16] [PASSED] YVU420 Modifier set just for plane 0, without DRM_MODE_FB_MODIFIERS [23:18:16] [PASSED] YVU420 Modifier set just for planes 0, 1, without DRM_MODE_FB_MODIFIERS [23:18:16] [PASSED] YVU420 Modifier set just for plane 0, 1, with DRM_MODE_FB_MODIFIERS [23:18:16] [PASSED] YVU420 Valid modifier [23:18:16] [PASSED] YVU420 Different modifiers per plane [23:18:16] [PASSED] YVU420 Modifier for inexistent plane [23:18:16] [PASSED] YUV420_10BIT Invalid modifier(DRM_FORMAT_MOD_LINEAR) [23:18:16] [PASSED] X0L2 Normal sizes [23:18:16] [PASSED] X0L2 Max sizes [23:18:16] [PASSED] X0L2 Invalid pitch [23:18:16] [PASSED] X0L2 Pitch greater than minimum required [23:18:16] [PASSED] X0L2 Handle for inexistent plane [23:18:16] [PASSED] X0L2 Offset for inexistent plane, without DRM_MODE_FB_MODIFIERS set [23:18:16] [PASSED] X0L2 Modifier without DRM_MODE_FB_MODIFIERS set [23:18:16] [PASSED] X0L2 Valid modifier [23:18:16] [PASSED] X0L2 Modifier for inexistent plane [23:18:16] =========== [PASSED] drm_test_framebuffer_create =========== [23:18:16] [PASSED] drm_test_framebuffer_free [23:18:16] [PASSED] drm_test_framebuffer_init [23:18:16] [PASSED] drm_test_framebuffer_init_bad_format [23:18:16] [PASSED] drm_test_framebuffer_init_dev_mismatch [23:18:16] [PASSED] drm_test_framebuffer_lookup [23:18:16] [PASSED] drm_test_framebuffer_lookup_inexistent [23:18:16] [PASSED] drm_test_framebuffer_modifiers_not_supported [23:18:16] ================= [PASSED] drm_framebuffer ================= [23:18:16] ================ drm_gem_shmem (8 subtests) ================ [23:18:16] [PASSED] drm_gem_shmem_test_obj_create [23:18:16] [PASSED] drm_gem_shmem_test_obj_create_private [23:18:16] [PASSED] drm_gem_shmem_test_pin_pages [23:18:16] [PASSED] drm_gem_shmem_test_vmap [23:18:16] [PASSED] drm_gem_shmem_test_get_sg_table [23:18:16] [PASSED] drm_gem_shmem_test_get_pages_sgt [23:18:16] [PASSED] drm_gem_shmem_test_madvise [23:18:16] [PASSED] drm_gem_shmem_test_purge [23:18:16] ================== [PASSED] drm_gem_shmem ================== [23:18:16] === drm_atomic_helper_connector_hdmi_check (29 subtests) === [23:18:16] [PASSED] drm_test_check_broadcast_rgb_auto_cea_mode [23:18:16] [PASSED] drm_test_check_broadcast_rgb_auto_cea_mode_vic_1 [23:18:16] [PASSED] drm_test_check_broadcast_rgb_full_cea_mode [23:18:16] [PASSED] drm_test_check_broadcast_rgb_full_cea_mode_vic_1 [23:18:16] [PASSED] drm_test_check_broadcast_rgb_limited_cea_mode [23:18:16] [PASSED] drm_test_check_broadcast_rgb_limited_cea_mode_vic_1 [23:18:16] ====== drm_test_check_broadcast_rgb_cea_mode_yuv420 ======= [23:18:16] [PASSED] Automatic [23:18:16] [PASSED] Full [23:18:16] [PASSED] Limited 16:235 [23:18:16] == [PASSED] drm_test_check_broadcast_rgb_cea_mode_yuv420 === [23:18:16] [PASSED] drm_test_check_broadcast_rgb_crtc_mode_changed [23:18:16] [PASSED] drm_test_check_broadcast_rgb_crtc_mode_not_changed [23:18:16] [PASSED] drm_test_check_disable_connector [23:18:16] [PASSED] drm_test_check_hdmi_funcs_reject_rate [23:18:16] [PASSED] drm_test_check_max_tmds_rate_bpc_fallback_rgb [23:18:16] [PASSED] drm_test_check_max_tmds_rate_bpc_fallback_yuv420 [23:18:16] [PASSED] drm_test_check_max_tmds_rate_bpc_fallback_ignore_yuv422 [23:18:16] [PASSED] drm_test_check_max_tmds_rate_bpc_fallback_ignore_yuv420 [23:18:16] [PASSED] drm_test_check_driver_unsupported_fallback_yuv420 [23:18:16] [PASSED] drm_test_check_output_bpc_crtc_mode_changed [23:18:16] [PASSED] drm_test_check_output_bpc_crtc_mode_not_changed [23:18:16] [PASSED] drm_test_check_output_bpc_dvi [23:18:16] [PASSED] drm_test_check_output_bpc_format_vic_1 [23:18:16] [PASSED] drm_test_check_output_bpc_format_display_8bpc_only [23:18:16] [PASSED] drm_test_check_output_bpc_format_display_rgb_only [23:18:16] [PASSED] drm_test_check_output_bpc_format_driver_8bpc_only [23:18:16] [PASSED] drm_test_check_output_bpc_format_driver_rgb_only [23:18:16] [PASSED] drm_test_check_tmds_char_rate_rgb_8bpc [23:18:16] [PASSED] drm_test_check_tmds_char_rate_rgb_10bpc [23:18:16] [PASSED] drm_test_check_tmds_char_rate_rgb_12bpc [23:18:16] ============ drm_test_check_hdmi_color_format ============= [23:18:16] [PASSED] AUTO -> RGB [23:18:16] [PASSED] YCBCR422 -> YUV422 [23:18:16] [PASSED] YCBCR420 -> YUV420 [23:18:16] [PASSED] YCBCR444 -> YUV444 [23:18:16] [PASSED] RGB -> RGB [23:18:16] ======== [PASSED] drm_test_check_hdmi_color_format ========= [23:18:16] ======== drm_test_check_hdmi_color_format_420_only ======== [23:18:16] [PASSED] RGB should fail [23:18:16] [PASSED] YUV444 should fail [23:18:16] [PASSED] YUV422 should fail [23:18:16] [PASSED] YUV420 should work [23:18:16] ==== [PASSED] drm_test_check_hdmi_color_format_420_only ==== [23:18:16] ===== [PASSED] drm_atomic_helper_connector_hdmi_check ====== [23:18:16] === drm_atomic_helper_connector_hdmi_reset (6 subtests) ==== [23:18:16] [PASSED] drm_test_check_broadcast_rgb_value [23:18:16] [PASSED] drm_test_check_bpc_8_value [23:18:16] [PASSED] drm_test_check_bpc_10_value [23:18:16] [PASSED] drm_test_check_bpc_12_value [23:18:16] [PASSED] drm_test_check_format_value [23:18:16] [PASSED] drm_test_check_tmds_char_value [23:18:16] ===== [PASSED] drm_atomic_helper_connector_hdmi_reset ====== [23:18:16] = drm_atomic_helper_connector_hdmi_mode_valid (7 subtests) = [23:18:16] [PASSED] drm_test_check_mode_valid [23:18:16] [PASSED] drm_test_check_mode_valid_reject [23:18:16] [PASSED] drm_test_check_mode_valid_reject_rate [23:18:16] [PASSED] drm_test_check_mode_valid_reject_max_clock [23:18:16] [PASSED] drm_test_check_mode_valid_yuv420_only_max_clock [23:18:16] [PASSED] drm_test_check_mode_valid_reject_yuv420_only_connector [23:18:16] [PASSED] drm_test_check_mode_valid_accept_yuv420_also_connector_rgb [23:18:16] === [PASSED] drm_atomic_helper_connector_hdmi_mode_valid === [23:18:16] = drm_atomic_helper_connector_hdmi_infoframes (5 subtests) = [23:18:16] [PASSED] drm_test_check_infoframes [23:18:16] [PASSED] drm_test_check_reject_avi_infoframe [23:18:16] [PASSED] drm_test_check_reject_hdr_infoframe_bpc_8 [23:18:16] [PASSED] drm_test_check_reject_hdr_infoframe_bpc_10 [23:18:16] [PASSED] drm_test_check_reject_audio_infoframe [23:18:16] === [PASSED] drm_atomic_helper_connector_hdmi_infoframes === [23:18:16] ================= drm_managed (2 subtests) ================= [23:18:16] [PASSED] drm_test_managed_release_action [23:18:16] [PASSED] drm_test_managed_run_action [23:18:16] =================== [PASSED] drm_managed =================== [23:18:16] =================== drm_mm (6 subtests) ==================== [23:18:16] [PASSED] drm_test_mm_init [23:18:16] [PASSED] drm_test_mm_debug [23:18:16] [PASSED] drm_test_mm_align32 [23:18:16] [PASSED] drm_test_mm_align64 [23:18:16] [PASSED] drm_test_mm_lowest [23:18:16] [PASSED] drm_test_mm_highest [23:18:16] ===================== [PASSED] drm_mm ====================== [23:18:16] ============= drm_modes_analog_tv (5 subtests) ============= [23:18:16] [PASSED] drm_test_modes_analog_tv_mono_576i [23:18:16] [PASSED] drm_test_modes_analog_tv_ntsc_480i [23:18:16] [PASSED] drm_test_modes_analog_tv_ntsc_480i_inlined [23:18:16] [PASSED] drm_test_modes_analog_tv_pal_576i [23:18:16] [PASSED] drm_test_modes_analog_tv_pal_576i_inlined [23:18:16] =============== [PASSED] drm_modes_analog_tv =============== [23:18:16] ============== drm_plane_helper (2 subtests) =============== [23:18:16] =============== drm_test_check_plane_state ================ [23:18:16] [PASSED] clipping_simple [23:18:16] [PASSED] clipping_rotate_reflect [23:18:16] [PASSED] positioning_simple [23:18:16] [PASSED] upscaling [23:18:16] [PASSED] downscaling [23:18:16] [PASSED] rounding1 [23:18:16] [PASSED] rounding2 [23:18:16] [PASSED] rounding3 [23:18:16] [PASSED] rounding4 [23:18:16] =========== [PASSED] drm_test_check_plane_state ============ [23:18:16] =========== drm_test_check_invalid_plane_state ============ [23:18:16] [PASSED] positioning_invalid [23:18:16] [PASSED] upscaling_invalid [23:18:16] [PASSED] downscaling_invalid [23:18:16] ======= [PASSED] drm_test_check_invalid_plane_state ======== [23:18:16] ================ [PASSED] drm_plane_helper ================= [23:18:16] ====== drm_connector_helper_tv_get_modes (1 subtest) ======= [23:18:16] ====== drm_test_connector_helper_tv_get_modes_check ======= [23:18:16] [PASSED] None [23:18:16] [PASSED] PAL [23:18:16] [PASSED] NTSC [23:18:16] [PASSED] Both, NTSC Default [23:18:16] [PASSED] Both, PAL Default [23:18:16] [PASSED] Both, NTSC Default, with PAL on command-line [23:18:16] [PASSED] Both, PAL Default, with NTSC on command-line [23:18:16] == [PASSED] drm_test_connector_helper_tv_get_modes_check === [23:18:16] ======== [PASSED] drm_connector_helper_tv_get_modes ======== [23:18:16] ================== drm_rect (9 subtests) =================== [23:18:16] [PASSED] drm_test_rect_clip_scaled_div_by_zero [23:18:16] [PASSED] drm_test_rect_clip_scaled_not_clipped [23:18:16] [PASSED] drm_test_rect_clip_scaled_clipped [23:18:16] [PASSED] drm_test_rect_clip_scaled_signed_vs_unsigned [23:18:16] ================= drm_test_rect_intersect ================= [23:18:16] [PASSED] top-left x bottom-right: 2x2+1+1 x 2x2+0+0 [23:18:16] [PASSED] top-right x bottom-left: 2x2+0+0 x 2x2+1-1 [23:18:16] [PASSED] bottom-left x top-right: 2x2+1-1 x 2x2+0+0 [23:18:16] [PASSED] bottom-right x top-left: 2x2+0+0 x 2x2+1+1 [23:18:16] [PASSED] right x left: 2x1+0+0 x 3x1+1+0 [23:18:16] [PASSED] left x right: 3x1+1+0 x 2x1+0+0 [23:18:16] [PASSED] up x bottom: 1x2+0+0 x 1x3+0-1 [23:18:16] [PASSED] bottom x up: 1x3+0-1 x 1x2+0+0 [23:18:16] [PASSED] touching corner: 1x1+0+0 x 2x2+1+1 [23:18:16] [PASSED] touching side: 1x1+0+0 x 1x1+1+0 [23:18:16] [PASSED] equal rects: 2x2+0+0 x 2x2+0+0 [23:18:16] [PASSED] inside another: 2x2+0+0 x 1x1+1+1 [23:18:16] [PASSED] far away: 1x1+0+0 x 1x1+3+6 [23:18:16] [PASSED] points intersecting: 0x0+5+10 x 0x0+5+10 [23:18:16] [PASSED] points not intersecting: 0x0+0+0 x 0x0+5+10 [23:18:16] ============= [PASSED] drm_test_rect_intersect ============= [23:18:16] ================ drm_test_rect_calc_hscale ================ [23:18:16] [PASSED] normal use [23:18:16] [PASSED] out of max range [23:18:16] [PASSED] out of min range [23:18:16] [PASSED] zero dst [23:18:16] [PASSED] negative src [23:18:16] [PASSED] negative dst [23:18:16] ============ [PASSED] drm_test_rect_calc_hscale ============ [23:18:16] ================ drm_test_rect_calc_vscale ================ [23:18:16] [PASSED] normal use [23:18:16] [PASSED] out of max range [23:18:16] [PASSED] out of min range [23:18:16] [PASSED] zero dst [23:18:16] [PASSED] negative src [23:18:16] [PASSED] negative dst [23:18:16] ============ [PASSED] drm_test_rect_calc_vscale ============ [23:18:16] ================== drm_test_rect_rotate =================== [23:18:16] [PASSED] reflect-x [23:18:16] [PASSED] reflect-y [23:18:16] [PASSED] rotate-0 [23:18:16] [PASSED] rotate-90 [23:18:16] [PASSED] rotate-180 [23:18:16] [PASSED] rotate-270 [23:18:16] ============== [PASSED] drm_test_rect_rotate =============== [23:18:16] ================ drm_test_rect_rotate_inv ================= [23:18:16] [PASSED] reflect-x [23:18:16] [PASSED] reflect-y [23:18:16] [PASSED] rotate-0 [23:18:16] [PASSED] rotate-90 [23:18:16] [PASSED] rotate-180 [23:18:16] [PASSED] rotate-270 [23:18:16] ============ [PASSED] drm_test_rect_rotate_inv ============= [23:18:16] ==================== [PASSED] drm_rect ===================== [23:18:16] ============ drm_sysfb_modeset_test (1 subtest) ============ [23:18:16] ============ drm_test_sysfb_build_fourcc_list ============= [23:18:16] [PASSED] no native formats [23:18:16] [PASSED] XRGB8888 as native format [23:18:16] [PASSED] remove duplicates [23:18:16] [PASSED] convert alpha formats [23:18:16] [PASSED] random formats [23:18:16] ======== [PASSED] drm_test_sysfb_build_fourcc_list ========= [23:18:16] ============= [PASSED] drm_sysfb_modeset_test ============== [23:18:16] ================== drm_fixp (2 subtests) =================== [23:18:16] [PASSED] drm_test_int2fixp [23:18:16] [PASSED] drm_test_sm2fixp [23:18:16] ==================== [PASSED] drm_fixp ===================== [23:18:16] ============================================================ [23:18:16] Testing complete. Ran 637 tests: passed: 637 [23:18:16] Elapsed time: 26.664s total, 1.786s configuring, 24.713s building, 0.154s running
+ /kernel/tools/testing/kunit/kunit.py run --kunitconfig /kernel/drivers/gpu/drm/ttm/tests/.kunitconfig [23:18:16] Configuring KUnit Kernel ...
Regenerating .config ...
Populating config with:
$ make ARCH=um O=.kunit olddefconfig [23:18:18] Building KUnit Kernel ... Populating config with: $ make ARCH=um O=.kunit olddefconfig Building with: $ make all compile_commands.json scripts_gdb ARCH=um O=.kunit --jobs=48 [23:18:28] Starting KUnit Kernel (1/1)... [23:18:28] ============================================================ Running tests with: $ .kunit/linux kunit.enable=1 mem=1G console=tty kunit_shutdown=halt [23:18:28] ================= ttm_device (5 subtests) ================== [23:18:28] [PASSED] ttm_device_init_basic [23:18:28] [PASSED] ttm_device_init_multiple [23:18:28] [PASSED] ttm_device_fini_basic [23:18:28] [PASSED] ttm_device_init_no_vma_man [23:18:28] ================== ttm_device_init_pools ================== [23:18:28] [PASSED] No DMA allocations, no DMA32 required [23:18:28] [PASSED] DMA allocations, DMA32 required [23:18:28] [PASSED] No DMA allocations, DMA32 required [23:18:28] [PASSED] DMA allocations, no DMA32 required [23:18:28] ============== [PASSED] ttm_device_init_pools ============== [23:18:28] =================== [PASSED] ttm_device ==================== [23:18:28] ================== ttm_pool (8 subtests) =================== [23:18:28] ================== ttm_pool_alloc_basic =================== [23:18:28] [PASSED] One page [23:18:28] [PASSED] More than one page [23:18:28] [PASSED] Above the allocation limit [23:18:28] [PASSED] One page, with coherent DMA mappings enabled [23:18:28] [PASSED] Above the allocation limit, with coherent DMA mappings enabled [23:18:28] ============== [PASSED] ttm_pool_alloc_basic =============== [23:18:28] ============== ttm_pool_alloc_basic_dma_addr ============== [23:18:28] [PASSED] One page [23:18:28] [PASSED] More than one page [23:18:28] [PASSED] Above the allocation limit [23:18:28] [PASSED] One page, with coherent DMA mappings enabled [23:18:28] [PASSED] Above the allocation limit, with coherent DMA mappings enabled [23:18:28] ========== [PASSED] ttm_pool_alloc_basic_dma_addr ========== [23:18:28] [PASSED] ttm_pool_alloc_order_caching_match [23:18:28] [PASSED] ttm_pool_alloc_caching_mismatch [23:18:28] [PASSED] ttm_pool_alloc_order_mismatch [23:18:28] [PASSED] ttm_pool_free_dma_alloc [23:18:28] [PASSED] ttm_pool_free_no_dma_alloc [23:18:28] [PASSED] ttm_pool_fini_basic [23:18:28] ==================== [PASSED] ttm_pool ===================== [23:18:28] ================ ttm_resource (8 subtests) ================= [23:18:28] ================= ttm_resource_init_basic ================= [23:18:28] [PASSED] Init resource in TTM_PL_SYSTEM [23:18:28] [PASSED] Init resource in TTM_PL_VRAM [23:18:28] [PASSED] Init resource in a private placement [23:18:28] [PASSED] Init resource in TTM_PL_SYSTEM, set placement flags [23:18:28] ============= [PASSED] ttm_resource_init_basic ============= [23:18:28] [PASSED] ttm_resource_init_pinned [23:18:28] [PASSED] ttm_resource_fini_basic [23:18:28] [PASSED] ttm_resource_manager_init_basic [23:18:28] [PASSED] ttm_resource_manager_usage_basic [23:18:28] [PASSED] ttm_resource_manager_set_used_basic [23:18:28] [PASSED] ttm_sys_man_alloc_basic [23:18:28] [PASSED] ttm_sys_man_free_basic [23:18:28] ================== [PASSED] ttm_resource =================== [23:18:28] =================== ttm_tt (15 subtests) =================== [23:18:28] ==================== ttm_tt_init_basic ==================== [23:18:28] [PASSED] Page-aligned size [23:18:28] [PASSED] Extra pages requested [23:18:28] ================ [PASSED] ttm_tt_init_basic ================ [23:18:28] [PASSED] ttm_tt_init_misaligned [23:18:28] [PASSED] ttm_tt_fini_basic [23:18:28] [PASSED] ttm_tt_fini_sg [23:18:28] [PASSED] ttm_tt_fini_shmem [23:18:28] [PASSED] ttm_tt_create_basic [23:18:28] [PASSED] ttm_tt_create_invalid_bo_type [23:18:28] [PASSED] ttm_tt_create_ttm_exists [23:18:28] [PASSED] ttm_tt_create_failed [23:18:28] [PASSED] ttm_tt_destroy_basic [23:18:28] [PASSED] ttm_tt_populate_null_ttm [23:18:28] [PASSED] ttm_tt_populate_populated_ttm [23:18:28] [PASSED] ttm_tt_unpopulate_basic [23:18:28] [PASSED] ttm_tt_unpopulate_empty_ttm [23:18:28] [PASSED] ttm_tt_swapin_basic [23:18:28] ===================== [PASSED] ttm_tt ====================== [23:18:28] =================== ttm_bo (14 subtests) =================== [23:18:28] =========== ttm_bo_reserve_optimistic_no_ticket =========== [23:18:28] [PASSED] Cannot be interrupted and sleeps [23:18:28] [PASSED] Cannot be interrupted, locks straight away [23:18:28] [PASSED] Can be interrupted, sleeps [23:18:28] ======= [PASSED] ttm_bo_reserve_optimistic_no_ticket ======= [23:18:28] [PASSED] ttm_bo_reserve_locked_no_sleep [23:18:28] [PASSED] ttm_bo_reserve_no_wait_ticket [23:18:28] [PASSED] ttm_bo_reserve_double_resv [23:18:28] [PASSED] ttm_bo_reserve_interrupted [23:18:28] [PASSED] ttm_bo_reserve_deadlock [23:18:28] [PASSED] ttm_bo_unreserve_basic [23:18:28] [PASSED] ttm_bo_unreserve_pinned [23:18:28] [PASSED] ttm_bo_unreserve_bulk [23:18:28] [PASSED] ttm_bo_fini_basic [23:18:28] [PASSED] ttm_bo_fini_shared_resv [23:18:28] [PASSED] ttm_bo_pin_basic [23:18:28] [PASSED] ttm_bo_pin_unpin_resource [23:18:28] [PASSED] ttm_bo_multiple_pin_one_unpin [23:18:28] ===================== [PASSED] ttm_bo ====================== [23:18:28] ============== ttm_bo_validate (22 subtests) =============== [23:18:28] ============== ttm_bo_init_reserved_sys_man =============== [23:18:28] [PASSED] Buffer object for userspace [23:18:28] [PASSED] Kernel buffer object [23:18:28] [PASSED] Shared buffer object [23:18:28] ========== [PASSED] ttm_bo_init_reserved_sys_man =========== [23:18:28] ============== ttm_bo_init_reserved_mock_man ============== [23:18:28] [PASSED] Buffer object for userspace [23:18:28] [PASSED] Kernel buffer object [23:18:28] [PASSED] Shared buffer object [23:18:28] ========== [PASSED] ttm_bo_init_reserved_mock_man ========== [23:18:28] [PASSED] ttm_bo_init_reserved_resv [23:18:28] ================== ttm_bo_validate_basic ================== [23:18:28] [PASSED] Buffer object for userspace [23:18:28] [PASSED] Kernel buffer object [23:18:28] [PASSED] Shared buffer object [23:18:28] ============== [PASSED] ttm_bo_validate_basic ============== [23:18:28] [PASSED] ttm_bo_validate_invalid_placement [23:18:28] ============= ttm_bo_validate_same_placement ============== [23:18:28] [PASSED] System manager [23:18:28] [PASSED] VRAM manager [23:18:28] ========= [PASSED] ttm_bo_validate_same_placement ========== [23:18:28] [PASSED] ttm_bo_validate_failed_alloc [23:18:28] [PASSED] ttm_bo_validate_pinned [23:18:28] [PASSED] ttm_bo_validate_busy_placement [23:18:28] ================ ttm_bo_validate_multihop ================= [23:18:28] [PASSED] Buffer object for userspace [23:18:28] [PASSED] Kernel buffer object [23:18:28] [PASSED] Shared buffer object [23:18:28] ============ [PASSED] ttm_bo_validate_multihop ============= [23:18:28] ========== ttm_bo_validate_no_placement_signaled ========== [23:18:28] [PASSED] Buffer object in system domain, no page vector [23:18:28] [PASSED] Buffer object in system domain with an existing page vector [23:18:28] ====== [PASSED] ttm_bo_validate_no_placement_signaled ====== [23:18:28] ======== ttm_bo_validate_no_placement_not_signaled ======== [23:18:28] [PASSED] Buffer object for userspace [23:18:28] [PASSED] Kernel buffer object [23:18:28] [PASSED] Shared buffer object [23:18:28] ==== [PASSED] ttm_bo_validate_no_placement_not_signaled ==== [23:18:28] [PASSED] ttm_bo_validate_move_fence_signaled [23:18:28] ========= ttm_bo_validate_move_fence_not_signaled ========= [23:18:28] [PASSED] Waits for GPU [23:18:28] [PASSED] Tries to lock straight away [23:18:28] ===== [PASSED] ttm_bo_validate_move_fence_not_signaled ===== [23:18:28] [PASSED] ttm_bo_validate_swapout [23:18:28] [PASSED] ttm_bo_validate_happy_evict [23:18:28] [PASSED] ttm_bo_validate_all_pinned_evict [23:18:28] [PASSED] ttm_bo_validate_allowed_only_evict [23:18:28] [PASSED] ttm_bo_validate_deleted_evict [23:18:28] [PASSED] ttm_bo_validate_busy_domain_evict [23:18:28] [PASSED] ttm_bo_validate_evict_gutting [23:18:28] [PASSED] ttm_bo_validate_recrusive_evict [23:18:28] ================= [PASSED] ttm_bo_validate ================= [23:18:28] ============================================================ [23:18:28] Testing complete. Ran 102 tests: passed: 102 [23:18:28] Elapsed time: 11.990s total, 1.792s configuring, 9.983s building, 0.180s running
+ cleanup
++ stat -c %u:%g /kernel
+ chown -R 1003:1003 /kernel
Patchwork
CI✓ Xe.CI.BAT: success for Fix device page migration in low memory fallback (rev3)
In reply to Matthew Brost== Series Details ==
== Series Details ==
Series: Fix device page migration in low memory fallback (rev3)
URL : https://patchwork.freedesktop.org/series/171651/
State : success
== Summary ==
CI Bug Log - changes from xe-5548-ff9b76577dfe70713faaa2f19a30424ec9a51a18_BAT -> xe-pw-171651v3_BAT
====================================================
Summary
-------
**SUCCESS**
No regressions found.
Participating hosts (15 -> 14)
------------------------------
Missing (1): bat-bmg-2
Changes
-------
No changes found
Build changes
-------------
* Linux: xe-5548-ff9b76577dfe70713faaa2f19a30424ec9a51a18 -> xe-pw-171651v3
IGT_9039: 9039
xe-5548-ff9b76577dfe70713faaa2f19a30424ec9a51a18: ff9b76577dfe70713faaa2f19a30424ec9a51a18
xe-pw-171651v3: 171651v3
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-171651v3/index.html
Patchwork
CI✓ Xe.CI.FULL: success for Fix device page migration in low memory fallback (rev3)
In reply to Matthew Brost== Series Details ==
== Series Details ==
Series: Fix device page migration in low memory fallback (rev3)
URL : https://patchwork.freedesktop.org/series/171651/
State : success
== Summary ==
CI Bug Log - changes from xe-5548-ff9b76577dfe70713faaa2f19a30424ec9a51a18_FULL -> xe-pw-171651v3_FULL
====================================================
Summary
-------
**SUCCESS**
No regressions found.
Participating hosts (2 -> 2)
------------------------------
No changes in participating hosts
Known issues
------------
Here are the changes found in xe-pw-171651v3_FULL that come from known issues:
### IGT changes ###
#### Issues hit ####
* igt@kms_async_flips@alternate-sync-async-flip:
- shard-bmg: [PASS][1] -> [FAIL][2] ([Intel XE#3718] / [Intel XE#6078])
[1]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-5548-ff9b76577dfe70713faaa2f19a30424ec9a51a18/shard-bmg-7/igt@[email protected]
[2]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-171651v3/shard-bmg-7/igt@[email protected]
* igt@kms_async_flips@alternate-sync-async-flip@pipe-a-dp-2:
- shard-bmg: [PASS][3] -> [FAIL][4] ([Intel XE#6078])
[3]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-5548-ff9b76577dfe70713faaa2f19a30424ec9a51a18/shard-bmg-7/igt@kms_async_flips@[email protected]
[4]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-171651v3/shard-bmg-7/igt@kms_async_flips@[email protected]
* igt@kms_atomic_transition@plane-all-modeset-transition-internal-panels:
- shard-bmg: NOTRUN -> [SKIP][5] ([Intel XE#2370])
[5]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-171651v3/shard-bmg-9/igt@kms_atomic_transition@plane-all-modeset-transition-internal-panels.html
* igt@kms_big_fb@linear-64bpp-rotate-90:
- shard-bmg: NOTRUN -> [SKIP][6] ([Intel XE#2327])
[6]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-171651v3/shard-bmg-9/igt@[email protected]
* igt@kms_big_fb@yf-tiled-max-hw-stride-64bpp-rotate-0-hflip:
- shard-bmg: NOTRUN -> [SKIP][7] ([Intel XE#1124]) +5 other tests skip
[7]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-171651v3/shard-bmg-9/igt@[email protected]
* igt@kms_bw@linear-tiling-2-displays-target-2160x1440p:
- shard-bmg: NOTRUN -> [SKIP][8] ([Intel XE#367]) +1 other test skip
[8]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-171651v3/shard-bmg-9/igt@[email protected]
* igt@kms_ccs@crc-primary-suspend-yf-tiled-ccs:
- shard-bmg: NOTRUN -> [SKIP][9] ([Intel XE#3432]) +1 other test skip
[9]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-171651v3/shard-bmg-9/igt@[email protected]
* igt@kms_ccs@random-ccs-data-4-tiled-dg2-rc-ccs-cc:
- shard-bmg: NOTRUN -> [SKIP][10] ([Intel XE#2887]) +3 other tests skip
[10]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-171651v3/shard-bmg-9/igt@[email protected]
* igt@kms_chamelium_color@ctm-max:
- shard-bmg: NOTRUN -> [SKIP][11] ([Intel XE#2325] / [Intel XE#7358])
[11]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-171651v3/shard-bmg-9/igt@[email protected]
* igt@kms_chamelium_hpd@hdmi-hpd-after-hibernate:
- shard-bmg: NOTRUN -> [SKIP][12] ([Intel XE#2252]) +4 other tests skip
[12]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-171651v3/shard-bmg-9/igt@[email protected]
* igt@kms_content_protection@dp-mst-lic-type-1:
- shard-bmg: NOTRUN -> [SKIP][13] ([Intel XE#2390] / [Intel XE#6974])
[13]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-171651v3/shard-bmg-9/igt@[email protected]
* igt@kms_cursor_crc@cursor-offscreen-32x10:
- shard-bmg: NOTRUN -> [SKIP][14] ([Intel XE#2320]) +1 other test skip
[14]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-171651v3/shard-bmg-9/igt@[email protected]
* igt@kms_cursor_legacy@short-busy-flip-before-cursor-toggle:
- shard-bmg: NOTRUN -> [SKIP][15] ([Intel XE#2286] / [Intel XE#6035])
[15]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-171651v3/shard-bmg-9/igt@[email protected]
* igt@kms_dsc@dsc-basic-ultrajoiner:
- shard-bmg: NOTRUN -> [SKIP][16] ([Intel XE#8265]) +1 other test skip
[16]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-171651v3/shard-bmg-9/igt@[email protected]
* igt@kms_feature_discovery@dp-mst:
- shard-bmg: NOTRUN -> [SKIP][17] ([Intel XE#2375])
[17]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-171651v3/shard-bmg-9/igt@[email protected]
* igt@kms_feature_discovery@vrr:
- shard-bmg: NOTRUN -> [SKIP][18] ([Intel XE#8586])
[18]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-171651v3/shard-bmg-9/igt@[email protected]
* igt@kms_flip@flip-vs-expired-vblank@b-edp1:
- shard-lnl: [PASS][19] -> [FAIL][20] ([Intel XE#301]) +3 other tests fail
[19]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-5548-ff9b76577dfe70713faaa2f19a30424ec9a51a18/shard-lnl-5/igt@kms_flip@[email protected]
[20]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-171651v3/shard-lnl-8/igt@kms_flip@[email protected]
* igt@kms_frontbuffer_tracking@drrshdr-1p-primscrn-spr-indfb-draw-blt:
- shard-bmg: NOTRUN -> [SKIP][21] ([Intel XE#2311]) +24 other tests skip
[21]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-171651v3/shard-bmg-9/igt@kms_frontbuffer_tracking@drrshdr-1p-primscrn-spr-indfb-draw-blt.html
* igt@kms_frontbuffer_tracking@drrshdr-argb161616f-draw-mmap-wc:
- shard-bmg: NOTRUN -> [SKIP][22] ([Intel XE#7061]) +5 other tests skip
[22]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-171651v3/shard-bmg-9/igt@[email protected]
* igt@kms_frontbuffer_tracking@fbc-2p-primscrn-spr-indfb-fullscreen:
- shard-bmg: NOTRUN -> [SKIP][23] ([Intel XE#4141]) +4 other tests skip
[23]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-171651v3/shard-bmg-9/igt@kms_frontbuffer_tracking@fbc-2p-primscrn-spr-indfb-fullscreen.html
* igt@kms_frontbuffer_tracking@fbcdrrshdr-tiling-y:
- shard-bmg: NOTRUN -> [SKIP][24] ([Intel XE#7399])
[24]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-171651v3/shard-bmg-9/igt@[email protected]
* igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-spr-indfb-draw-mmap-wc:
- shard-bmg: NOTRUN -> [SKIP][25] ([Intel XE#2313]) +24 other tests skip
[25]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-171651v3/shard-bmg-9/igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-spr-indfb-draw-mmap-wc.html
* igt@kms_plane@pixel-format-4-tiled-bmg-ccs-modifier@pipe-a-plane-5:
- shard-bmg: NOTRUN -> [SKIP][26] ([Intel XE#8303]) +1 other test skip
[26]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-171651v3/shard-bmg-9/igt@kms_plane@[email protected]
* igt@kms_plane@pixel-format-y-tiled-gen12-rc-ccs-cc-modifier-source-clamping:
- shard-bmg: NOTRUN -> [SKIP][27] ([Intel XE#7283])
[27]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-171651v3/shard-bmg-9/igt@kms_plane@pixel-format-y-tiled-gen12-rc-ccs-cc-modifier-source-clamping.html
* igt@kms_pm_dc@dc5-psr:
- shard-bmg: NOTRUN -> [SKIP][28] ([Intel XE#7794])
[28]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-171651v3/shard-bmg-9/igt@[email protected]
* igt@kms_psr2_sf@fbc-psr2-overlay-plane-update-sf-dmg-area:
- shard-bmg: NOTRUN -> [SKIP][29] ([Intel XE#1489]) +2 other tests skip
[29]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-171651v3/shard-bmg-9/igt@[email protected]
* igt@kms_psr@fbc-pr-sprite-plane-onoff:
- shard-bmg: NOTRUN -> [SKIP][30] ([Intel XE#2234] / [Intel XE#2850]) +3 other tests skip
[30]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-171651v3/shard-bmg-9/igt@[email protected]
* igt@kms_tv_load_detect@load-detect:
- shard-bmg: NOTRUN -> [SKIP][31] ([Intel XE#2450] / [Intel XE#5857])
[31]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-171651v3/shard-bmg-9/igt@[email protected]
* igt@xe_compute@ccs-mode-compute-kernel:
- shard-bmg: NOTRUN -> [SKIP][32] ([Intel XE#6599])
[32]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-171651v3/shard-bmg-9/igt@[email protected]
* igt@xe_evict@evict-mixed-many-threads-small:
- shard-bmg: [PASS][33] -> [INCOMPLETE][34] ([Intel XE#6321] / [Intel XE#8355])
[33]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-5548-ff9b76577dfe70713faaa2f19a30424ec9a51a18/shard-bmg-9/igt@[email protected]
[34]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-171651v3/shard-bmg-10/igt@[email protected]
* igt@xe_exec_basic@multigpu-no-exec-basic-defer-bind:
- shard-bmg: NOTRUN -> [SKIP][35] ([Intel XE#2322] / [Intel XE#7372]) +2 other tests skip
[35]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-171651v3/shard-bmg-9/igt@[email protected]
* igt@xe_exec_fault_mode@twice-multi-queue-imm:
- shard-bmg: NOTRUN -> [SKIP][36] ([Intel XE#8374]) +7 other tests skip
[36]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-171651v3/shard-bmg-9/igt@[email protected]
* igt@xe_exec_multi_queue@few-execs-preempt-mode-dyn-priority:
- shard-bmg: NOTRUN -> [SKIP][37] ([Intel XE#8364]) +12 other tests skip
[37]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-171651v3/shard-bmg-9/igt@[email protected]
* igt@xe_exec_threads@threads-multi-queue-mixed-userptr-rebind:
- shard-bmg: NOTRUN -> [SKIP][38] ([Intel XE#8378]) +1 other test skip
[38]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-171651v3/shard-bmg-9/igt@[email protected]
* igt@xe_fault_injection@inject-fault-probe-function-xe_guc_relay_init:
- shard-bmg: [PASS][39] -> [ABORT][40] ([Intel XE#8007]) +2 other tests abort
[39]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-5548-ff9b76577dfe70713faaa2f19a30424ec9a51a18/shard-bmg-7/igt@xe_fault_injection@inject-fault-probe-function-xe_guc_relay_init.html
[40]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-171651v3/shard-bmg-7/igt@xe_fault_injection@inject-fault-probe-function-xe_guc_relay_init.html
* igt@xe_multigpu_svm@mgpu-latency-copy-basic:
- shard-bmg: NOTRUN -> [SKIP][41] ([Intel XE#6964]) +1 other test skip
[41]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-171651v3/shard-bmg-9/igt@[email protected]
* igt@xe_page_reclaim@basic-mixed:
- shard-bmg: NOTRUN -> [SKIP][42] ([Intel XE#7793])
[42]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-171651v3/shard-bmg-9/igt@[email protected]
* igt@xe_pat@pat-sw-hw-suspend:
- shard-bmg: NOTRUN -> [FAIL][43] ([Intel XE#7695])
[43]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-171651v3/shard-bmg-9/igt@[email protected]
* igt@xe_pm@d3cold-basic:
- shard-bmg: NOTRUN -> [SKIP][44] ([Intel XE#2284] / [Intel XE#7370])
[44]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-171651v3/shard-bmg-9/igt@[email protected]
* igt@xe_pm@d3cold-i2c:
- shard-bmg: NOTRUN -> [SKIP][45] ([Intel XE#5694] / [Intel XE#7370])
[45]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-171651v3/shard-bmg-9/igt@[email protected]
* igt@xe_query@multigpu-query-topology-l3-bank-mask:
- shard-bmg: NOTRUN -> [SKIP][46] ([Intel XE#944]) +1 other test skip
[46]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-171651v3/shard-bmg-9/igt@[email protected]
* igt@xe_sriov_flr@flr-vfs-parallel:
- shard-bmg: NOTRUN -> [FAIL][47] ([Intel XE#6569])
[47]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-171651v3/shard-bmg-9/igt@[email protected]
#### Possible fixes ####
* igt@kms_sharpness_filter@invalid-plane-with-filter@pipe-a-edp-1-invalid-plane-with-filter:
- shard-lnl: [DMESG-WARN][48] ([Intel XE#8551]) -> [PASS][49] +1 other test pass
[48]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-5548-ff9b76577dfe70713faaa2f19a30424ec9a51a18/shard-lnl-3/igt@kms_sharpness_filter@invalid-plane-with-filter@pipe-a-edp-1-invalid-plane-with-filter.html
[49]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-171651v3/shard-lnl-5/igt@kms_sharpness_filter@invalid-plane-with-filter@pipe-a-edp-1-invalid-plane-with-filter.html
* igt@xe_evict@evict-beng-mixed-many-threads-small:
- shard-bmg: [INCOMPLETE][50] ([Intel XE#6321] / [Intel XE#8355]) -> [PASS][51]
[50]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-5548-ff9b76577dfe70713faaa2f19a30424ec9a51a18/shard-bmg-4/igt@[email protected]
[51]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-171651v3/shard-bmg-1/igt@[email protected]
* igt@xe_exec_threads@threads-mixed-basic:
- shard-bmg: [DMESG-WARN][52] ([Intel XE#8300]) -> [PASS][53]
[52]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-5548-ff9b76577dfe70713faaa2f19a30424ec9a51a18/shard-bmg-9/igt@[email protected]
[53]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-171651v3/shard-bmg-10/igt@[email protected]
* igt@xe_fault_injection@vm-create-fail-xe_pt_create:
- shard-bmg: [ABORT][54] ([Intel XE#8007]) -> [PASS][55] +1 other test pass
[54]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-5548-ff9b76577dfe70713faaa2f19a30424ec9a51a18/shard-bmg-3/igt@xe_fault_injection@vm-create-fail-xe_pt_create.html
[55]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-171651v3/shard-bmg-9/igt@xe_fault_injection@vm-create-fail-xe_pt_create.html
* igt@xe_sriov_auto_provisioning@fair-allocation@numvfs-random:
- shard-bmg: [FAIL][56] ([Intel XE#7992]) -> [PASS][57] +1 other test pass
[56]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-5548-ff9b76577dfe70713faaa2f19a30424ec9a51a18/shard-bmg-9/igt@xe_sriov_auto_provisioning@[email protected]
[57]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-171651v3/shard-bmg-2/igt@xe_sriov_auto_provisioning@[email protected]
#### Warnings ####
* igt@kms_tiled_display@basic-test-pattern:
- shard-bmg: [FAIL][58] ([Intel XE#1729] / [Intel XE#7424]) -> [SKIP][59] ([Intel XE#2426] / [Intel XE#5848])
[58]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-5548-ff9b76577dfe70713faaa2f19a30424ec9a51a18/shard-bmg-4/igt@[email protected]
[59]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-171651v3/shard-bmg-6/igt@[email protected]
[Intel XE#1124]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/1124
[Intel XE#1489]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/1489
[Intel XE#1729]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/1729
[Intel XE#2234]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/2234
[Intel XE#2252]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/2252
[Intel XE#2284]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/2284
[Intel XE#2286]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/2286
[Intel XE#2311]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/2311
[Intel XE#2313]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/2313
[Intel XE#2320]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/2320
[Intel XE#2322]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/2322
[Intel XE#2325]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/2325
[Intel XE#2327]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/2327
[Intel XE#2370]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/2370
[Intel XE#2375]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/2375
[Intel XE#2390]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/2390
[Intel XE#2426]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/2426
[Intel XE#2450]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/2450
[Intel XE#2850]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/2850
[Intel XE#2887]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/2887
[Intel XE#301]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/301
[Intel XE#3432]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/3432
[Intel XE#367]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/367
[Intel XE#3718]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/3718
[Intel XE#4141]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/4141
[Intel XE#5694]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/5694
[Intel XE#5848]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/5848
[Intel XE#5857]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/5857
[Intel XE#6035]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/6035
[Intel XE#6078]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/6078
[Intel XE#6321]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/6321
[Intel XE#6569]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/6569
[Intel XE#6599]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/6599
[Intel XE#6964]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/6964
[Intel XE#6974]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/6974
[Intel XE#7061]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/7061
[Intel XE#7283]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/7283
[Intel XE#7358]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/7358
[Intel XE#7370]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/7370
[Intel XE#7372]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/7372
[Intel XE#7399]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/7399
[Intel XE#7424]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/7424
[Intel XE#7695]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/7695
[Intel XE#7793]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/7793
[Intel XE#7794]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/7794
[Intel XE#7992]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/7992
[Intel XE#8007]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/8007
[Intel XE#8265]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/8265
[Intel XE#8300]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/8300
[Intel XE#8303]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/8303
[Intel XE#8355]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/8355
[Intel XE#8364]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/8364
[Intel XE#8374]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/8374
[Intel XE#8378]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/8378
[Intel XE#8551]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/8551
[Intel XE#8586]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/8586
[Intel XE#944]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/944
Build changes
-------------
* Linux: xe-5548-ff9b76577dfe70713faaa2f19a30424ec9a51a18 -> xe-pw-171651v3
IGT_9039: 9039
xe-5548-ff9b76577dfe70713faaa2f19a30424ec9a51a18: ff9b76577dfe70713faaa2f19a30424ec9a51a18
xe-pw-171651v3: 171651v3
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-171651v3/index.html