drm/i915: add guard page to ggtt->error_capture
Subsystems (2)
PATCH 1/1 drm/i915: add guard page to ggtt->error_capture
Some platforms (ADL, RPL, DG2) during CPU read of mapped GTT pages tries to prefetch data beyond page table boundary. If the next PTE in GTT points to invalid address it can cause DMAR errors. Adding guard PTE pointing to scratch page solves the issue in case of ggtt->error_capture.
---
This patch tries to diminish plague of DMAR errors present
in CI for ADL*, RPL*, DG2 platforms, see for example [1] (grep DMAR). This is upstreamed internal patch, with slightly modified commit message.
[1]: http://gfx-ci.igk.intel.com/tree/drm-tip/CI_DRM_12678/bat-adln-1/dmesg0.txt
Regards
Andrzej
--- drivers/gpu/drm/i915/gt/intel_ggtt.c | 25 +++++++++++++++++++++---- 1 file changed, 21 insertions(+), 4 deletions(-)
drivers/gpu/drm/i915/gt/intel_ggtt.c +21 -4
@@ -503,6 +503,13 @@ static void cleanup_init_ggtt(struct i915_ggtt *ggtt)mutex_destroy (&ggtt->error_mutex); } +static void ggtt_insert_scratch_page (struct i915_ggtt *ggtt,u64 offset) +{ +struct i915_address_space *vm = &ggtt->vm; + + vm->insert_page (vm,px_dma (vm->scratch[0 ]), offset,I915_CACHE_NONE ,0 ); +} +static int init_ggtt (struct i915_ggtt *ggtt) {/*
@@ -552,7 +559,7 @@ static int init_ggtt(struct i915_ggtt *ggtt)* the only likely reason for failure to insert is a driver * bug, which we expect to cause other failures... */ - ggtt->error_capture.size =I915_GTT_PAGE_SIZE ; + ggtt->error_capture.size =2 *I915_GTT_PAGE_SIZE ; ggtt->error_capture.color =I915_COLOR_UNEVICTABLE ;if (drm_mm_reserve_node (&ggtt->vm.mm, &ggtt->error_capture)) drm_mm_insert_node_in_range(&ggtt->vm.mm,
@@ -562,11 +569,21 @@ static int init_ggtt(struct i915_ggtt *ggtt)0 , ggtt->mappable_end, DRM_MM_INSERT_LOW); } -if (drm_mm_node_allocated (&ggtt->error_capture)) +if (drm_mm_node_allocated (&ggtt->error_capture)) { +u64 start = ggtt->error_capture.start; +u64 end = ggtt->error_capture.start + ggtt->error_capture.size; +u64 i; + +/* +* During error capture, memcpying from the GGTT is triggering a +* prefetch of the following PTE, so fill it with a guard page. +*/ +for (i = start +I915_GTT_PAGE_SIZE ; i < end; i +=I915_GTT_PAGE_SIZE ) +ggtt_insert_scratch_page (ggtt, i);drm_dbg (&ggtt->vm.i915->drm,"Reserved GGTT:[%llx, %llx] for use by error capture\n" , - ggtt->error_capture.start, - ggtt->error_capture.start + ggtt->error_capture.size); + start, end); + }/* * The upper portion of the GuC address space has a sizeable hole
Signature · 1 line
2.34.1
Patchwork
CI[Intel-gfx] ✗ Fi.CI.BAT: failure for drm/i915: add guard page to ggtt->error_capture
== Series Details ==
== Series Details ==
Series: drm/i915: add guard page to ggtt->error_capture
URL : https://patchwork.freedesktop.org/series/113560/
State : failure
== Summary ==
CI Bug Log - changes from CI_DRM_12680 -> Patchwork_113560v1
====================================================
Summary
-------
**FAILURE**
Serious unknown changes coming with Patchwork_113560v1 absolutely need to be verified manually.
If you think the reported changes have nothing to do with the changes introduced in Patchwork_113560v1, please notify your bug team to allow them to document this new failure mode, which will reduce false positives in CI.
External URL: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113560v1/index.html
Participating hosts (26 -> 26)
------------------------------
Additional (1): fi-kbl-soraka
Missing (1): fi-snb-2520m
Possible new issues
-------------------
Here are the unknown changes that may have been introduced in Patchwork_113560v1:
### IGT changes ###
#### Possible regressions ####
* igt@dmabuf@all-tests@dma_fence:
- fi-cfl-8109u: [PASS][1] -> [DMESG-FAIL][2]
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12680/fi-cfl-8109u/igt@dmabuf@all-tests@dma_fence.html
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113560v1/fi-cfl-8109u/igt@dmabuf@all-tests@dma_fence.html
* igt@dmabuf@all-tests@sanitycheck:
- fi-cfl-8109u: [PASS][3] -> [ABORT][4]
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12680/fi-cfl-8109u/igt@dmabuf@[email protected]
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113560v1/fi-cfl-8109u/igt@dmabuf@[email protected]
* igt@i915_module_load@load:
- fi-blb-e6850: [PASS][5] -> [ABORT][6]
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12680/fi-blb-e6850/igt@[email protected]
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113560v1/fi-blb-e6850/igt@[email protected]
Known issues
------------
Here are the changes found in Patchwork_113560v1 that come from known issues:
### IGT changes ###
#### Issues hit ####
* igt@fbdev@eof:
- fi-kbl-soraka: NOTRUN -> [DMESG-WARN][7] ([i915#1982])
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113560v1/fi-kbl-soraka/igt@[email protected]
* igt@gem_huc_copy@huc-copy:
- fi-kbl-soraka: NOTRUN -> [SKIP][8] ([fdo#109271] / [i915#2190])
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113560v1/fi-kbl-soraka/igt@[email protected]
* igt@gem_lmem_swapping@basic:
- fi-kbl-soraka: NOTRUN -> [SKIP][9] ([fdo#109271] / [i915#4613]) +3 similar issues
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113560v1/fi-kbl-soraka/igt@[email protected]
* igt@i915_selftest@live@execlists:
- fi-kbl-soraka: NOTRUN -> [INCOMPLETE][10] ([i915#7156])
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113560v1/fi-kbl-soraka/igt@i915_selftest@[email protected]
* igt@i915_selftest@live@gt_pm:
- fi-kbl-soraka: NOTRUN -> [DMESG-FAIL][11] ([i915#1886])
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113560v1/fi-kbl-soraka/igt@i915_selftest@live@gt_pm.html
* igt@kms_chamelium_frames@hdmi-crc-fast:
- fi-kbl-soraka: NOTRUN -> [SKIP][12] ([fdo#109271]) +15 similar issues
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113560v1/fi-kbl-soraka/igt@[email protected]
* igt@kms_cursor_legacy@basic-busy-flip-before-cursor@atomic-transitions:
- fi-bsw-n3050: [PASS][13] -> [FAIL][14] ([i915#6298])
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12680/fi-bsw-n3050/igt@kms_cursor_legacy@[email protected]
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113560v1/fi-bsw-n3050/igt@kms_cursor_legacy@[email protected]
#### Possible fixes ####
* igt@i915_selftest@live@migrate:
- {bat-dg2-11}: [DMESG-WARN][15] ([i915#7699]) -> [PASS][16]
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12680/bat-dg2-11/igt@i915_selftest@[email protected]
[16]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113560v1/bat-dg2-11/igt@i915_selftest@[email protected]
{name}: This element is suppressed. This means it is ignored when computing
the status of the difference (SUCCESS, WARNING, or FAILURE).
[fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
[i915#1886]: https://gitlab.freedesktop.org/drm/intel/issues/1886
[i915#1982]: https://gitlab.freedesktop.org/drm/intel/issues/1982
[i915#2190]: https://gitlab.freedesktop.org/drm/intel/issues/2190
[i915#4613]: https://gitlab.freedesktop.org/drm/intel/issues/4613
[i915#4983]: https://gitlab.freedesktop.org/drm/intel/issues/4983
[i915#6298]: https://gitlab.freedesktop.org/drm/intel/issues/6298
[i915#7156]: https://gitlab.freedesktop.org/drm/intel/issues/7156
[i915#7699]: https://gitlab.freedesktop.org/drm/intel/issues/7699
[i915#7913]: https://gitlab.freedesktop.org/drm/intel/issues/7913
[i915#7977]: https://gitlab.freedesktop.org/drm/intel/issues/7977
Build changes
-------------
* Linux: CI_DRM_12680 -> Patchwork_113560v1
CI-20190529: 20190529
CI_DRM_12680: 06086656e6f03cbcbb4b99273734a7943e923fc9 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_7143: c7b12dcc460fc2348e1fa7f4dcb791bb82e29e44 @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git
Patchwork_113560v1: 06086656e6f03cbcbb4b99273734a7943e923fc9 @ git://anongit.freedesktop.org/gfx-ci/linux
### Linux commits
4a7f29d250f7 drm/i915: add guard page to ggtt->error_capture
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113560v1/index.html
Patchwork
CI[Intel-gfx] ✗ Fi.CI.BAT: failure for drm/i915: add guard page to ggtt->error_capture (rev2)
In reply to Andrzej Hajda== Series Details ==
== Series Details ==
Series: drm/i915: add guard page to ggtt->error_capture (rev2)
URL : https://patchwork.freedesktop.org/series/113560/
State : failure
== Summary ==
CI Bug Log - changes from CI_DRM_12686 -> Patchwork_113560v2
====================================================
Summary
-------
**FAILURE**
Serious unknown changes coming with Patchwork_113560v2 absolutely need to be verified manually.
If you think the reported changes have nothing to do with the changes introduced in Patchwork_113560v2, please notify your bug team to allow them to document this new failure mode, which will reduce false positives in CI.
External URL: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113560v2/index.html
Participating hosts (26 -> 25)
------------------------------
Missing (1): fi-snb-2520m
Possible new issues
-------------------
Here are the unknown changes that may have been introduced in Patchwork_113560v2:
### IGT changes ###
#### Possible regressions ####
* igt@i915_module_load@load:
- fi-blb-e6850: [PASS][1] -> [ABORT][2]
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12686/fi-blb-e6850/igt@[email protected]
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113560v2/fi-blb-e6850/igt@[email protected]
#### Suppressed ####
The following results come from untrusted machines, tests, or statuses. They do not affect the overall result.
* igt@i915_selftest@live@requests:
- {bat-rpls-1}: [PASS][3] -> [ABORT][4]
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12686/bat-rpls-1/igt@i915_selftest@[email protected]
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113560v2/bat-rpls-1/igt@i915_selftest@[email protected]
Known issues
------------
Here are the changes found in Patchwork_113560v2 that come from known issues:
### IGT changes ###
{name}: This element is suppressed. This means it is ignored when computing
the status of the difference (SUCCESS, WARNING, or FAILURE).
[i915#6367]: https://gitlab.freedesktop.org/drm/intel/issues/6367
[i915#7699]: https://gitlab.freedesktop.org/drm/intel/issues/7699
[i915#7913]: https://gitlab.freedesktop.org/drm/intel/issues/7913
Build changes
-------------
* Linux: CI_DRM_12686 -> Patchwork_113560v2
CI-20190529: 20190529
CI_DRM_12686: 0b50be56bb4863e926efa2d89754d654fad828b9 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_7144: cda71bf809b981a646270963d6b1ccee4fd4643b @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git
Patchwork_113560v2: 0b50be56bb4863e926efa2d89754d654fad828b9 @ git://anongit.freedesktop.org/gfx-ci/linux
### Linux commits
4686bf2d3d9f drm/i915: add guard page to ggtt->error_capture
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113560v2/index.html