All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/i915/userptr: Never allow userptr into the mappable GGTT
@ 2019-09-27 16:34 Chris Wilson
  2019-09-27 16:42 ` ✗ Fi.CI.CHECKPATCH: warning for " Patchwork
                   ` (10 more replies)
  0 siblings, 11 replies; 14+ messages in thread
From: Chris Wilson @ 2019-09-27 16:34 UTC (permalink / raw)
  To: intel-gfx; +Cc: Chris Wilson, Tvrtko Ursulin, Daniel Vetter, stable

Daniel Vetter uncovered a nasty cycle in using the mmu-notifiers to
invalidate userptr objects which also happen to be pulled into GGTT
mmaps. That is when we unbind the userptr object (on mmu invalidation),
we revoke all CPU mmaps, which may then recurse into mmu invalidation.

We looked for ways of breaking the cycle, but the revocation on
invalidation is required and cannot be avoided. The only solution we
could see was to not allow such GGTT bindings of userptr objects in the
first place. In practice, no one really wants to use a GGTT mmapping of
a CPU pointer...

Just before Daniel's explosive lockdep patches land in rc1, we got a
genuine blip from CI:

<4>[  246.793958] ======================================================
<4>[  246.793972] WARNING: possible circular locking dependency detected
<4>[  246.793989] 5.3.0-gbd6c56f50d15-drmtip_372+ #1 Tainted: G     U
<4>[  246.794003] ------------------------------------------------------
<4>[  246.794017] kswapd0/145 is trying to acquire lock:
<4>[  246.794030] 000000003f565be6 (&dev->struct_mutex/1){+.+.}, at: userptr_mn_invalidate_range_start+0x18f/0x220 [i915]
<4>[  246.794250]
                  but task is already holding lock:
<4>[  246.794263] 000000001799cef9 (&anon_vma->rwsem){++++}, at: page_lock_anon_vma_read+0xe6/0x2a0
<4>[  246.794291]
                  which lock already depends on the new lock.

<4>[  246.794307]
                  the existing dependency chain (in reverse order) is:
<4>[  246.794322]
                  -> #3 (&anon_vma->rwsem){++++}:
<4>[  246.794344]        down_write+0x33/0x70
<4>[  246.794357]        __vma_adjust+0x3d9/0x7b0
<4>[  246.794370]        __split_vma+0x16a/0x180
<4>[  246.794385]        mprotect_fixup+0x2a5/0x320
<4>[  246.794399]        do_mprotect_pkey+0x208/0x2e0
<4>[  246.794413]        __x64_sys_mprotect+0x16/0x20
<4>[  246.794429]        do_syscall_64+0x55/0x1c0
<4>[  246.794443]        entry_SYSCALL_64_after_hwframe+0x49/0xbe
<4>[  246.794456]
                  -> #2 (&mapping->i_mmap_rwsem){++++}:
<4>[  246.794478]        down_write+0x33/0x70
<4>[  246.794493]        unmap_mapping_pages+0x48/0x130
<4>[  246.794519]        i915_vma_revoke_mmap+0x81/0x1b0 [i915]
<4>[  246.794519]        i915_vma_unbind+0x11d/0x4a0 [i915]
<4>[  246.794519]        i915_vma_destroy+0x31/0x300 [i915]
<4>[  246.794519]        __i915_gem_free_objects+0xb8/0x4b0 [i915]
<4>[  246.794519]        drm_file_free.part.0+0x1e6/0x290
<4>[  246.794519]        drm_release+0xa6/0xe0
<4>[  246.794519]        __fput+0xc2/0x250
<4>[  246.794519]        task_work_run+0x82/0xb0
<4>[  246.794519]        do_exit+0x35b/0xdb0
<4>[  246.794519]        do_group_exit+0x34/0xb0
<4>[  246.794519]        __x64_sys_exit_group+0xf/0x10
<4>[  246.794519]        do_syscall_64+0x55/0x1c0
<4>[  246.794519]        entry_SYSCALL_64_after_hwframe+0x49/0xbe
<4>[  246.794519]
                  -> #1 (&vm->mutex){+.+.}:
<4>[  246.794519]        i915_gem_shrinker_taints_mutex+0x6d/0xe0 [i915]
<4>[  246.794519]        i915_address_space_init+0x9f/0x160 [i915]
<4>[  246.794519]        i915_ggtt_init_hw+0x55/0x170 [i915]
<4>[  246.794519]        i915_driver_probe+0xc9f/0x1620 [i915]
<4>[  246.794519]        i915_pci_probe+0x43/0x1b0 [i915]
<4>[  246.794519]        pci_device_probe+0x9e/0x120
<4>[  246.794519]        really_probe+0xea/0x3d0
<4>[  246.794519]        driver_probe_device+0x10b/0x120
<4>[  246.794519]        device_driver_attach+0x4a/0x50
<4>[  246.794519]        __driver_attach+0x97/0x130
<4>[  246.794519]        bus_for_each_dev+0x74/0xc0
<4>[  246.794519]        bus_add_driver+0x13f/0x210
<4>[  246.794519]        driver_register+0x56/0xe0
<4>[  246.794519]        do_one_initcall+0x58/0x300
<4>[  246.794519]        do_init_module+0x56/0x1f6
<4>[  246.794519]        load_module+0x25bd/0x2a40
<4>[  246.794519]        __se_sys_finit_module+0xd3/0xf0
<4>[  246.794519]        do_syscall_64+0x55/0x1c0
<4>[  246.794519]        entry_SYSCALL_64_after_hwframe+0x49/0xbe
<4>[  246.794519]
                  -> #0 (&dev->struct_mutex/1){+.+.}:
<4>[  246.794519]        __lock_acquire+0x15d8/0x1e90
<4>[  246.794519]        lock_acquire+0xa6/0x1c0
<4>[  246.794519]        __mutex_lock+0x9d/0x9b0
<4>[  246.794519]        userptr_mn_invalidate_range_start+0x18f/0x220 [i915]
<4>[  246.794519]        __mmu_notifier_invalidate_range_start+0x85/0x110
<4>[  246.794519]        try_to_unmap_one+0x76b/0x860
<4>[  246.794519]        rmap_walk_anon+0x104/0x280
<4>[  246.794519]        try_to_unmap+0xc0/0xf0
<4>[  246.794519]        shrink_page_list+0x561/0xc10
<4>[  246.794519]        shrink_inactive_list+0x220/0x440
<4>[  246.794519]        shrink_node_memcg+0x36e/0x740
<4>[  246.794519]        shrink_node+0xcb/0x490
<4>[  246.794519]        balance_pgdat+0x241/0x580
<4>[  246.794519]        kswapd+0x16c/0x530
<4>[  246.794519]        kthread+0x119/0x130
<4>[  246.794519]        ret_from_fork+0x24/0x50
<4>[  246.794519]
                  other info that might help us debug this:

<4>[  246.794519] Chain exists of:
                    &dev->struct_mutex/1 --> &mapping->i_mmap_rwsem --> &anon_vma->rwsem

<4>[  246.794519]  Possible unsafe locking scenario:

<4>[  246.794519]        CPU0                    CPU1
<4>[  246.794519]        ----                    ----
<4>[  246.794519]   lock(&anon_vma->rwsem);
<4>[  246.794519]                                lock(&mapping->i_mmap_rwsem);
<4>[  246.794519]                                lock(&anon_vma->rwsem);
<4>[  246.794519]   lock(&dev->struct_mutex/1);
<4>[  246.794519]
                   *** DEADLOCK ***

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=111744
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: stable@vger.kernel.org
---
 drivers/gpu/drm/i915/gem/i915_gem_object.h       | 6 ++++++
 drivers/gpu/drm/i915/gem/i915_gem_object_types.h | 3 ++-
 drivers/gpu/drm/i915/gem/i915_gem_userptr.c      | 1 +
 drivers/gpu/drm/i915/i915_gem.c                  | 3 +++
 4 files changed, 12 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/gem/i915_gem_object.h b/drivers/gpu/drm/i915/gem/i915_gem_object.h
index 29b9eddc4c7f..aec05f967d9d 100644
--- a/drivers/gpu/drm/i915/gem/i915_gem_object.h
+++ b/drivers/gpu/drm/i915/gem/i915_gem_object.h
@@ -152,6 +152,12 @@ i915_gem_object_is_proxy(const struct drm_i915_gem_object *obj)
 	return obj->ops->flags & I915_GEM_OBJECT_IS_PROXY;
 }
 
+static inline bool
+i915_gem_object_never_bind_ggtt(const struct drm_i915_gem_object *obj)
+{
+	return obj->ops->flags & I915_GEM_OBJECT_NO_GGTT;
+}
+
 static inline bool
 i915_gem_object_needs_async_cancel(const struct drm_i915_gem_object *obj)
 {
diff --git a/drivers/gpu/drm/i915/gem/i915_gem_object_types.h b/drivers/gpu/drm/i915/gem/i915_gem_object_types.h
index d695f187b790..e1aab2fd1cd9 100644
--- a/drivers/gpu/drm/i915/gem/i915_gem_object_types.h
+++ b/drivers/gpu/drm/i915/gem/i915_gem_object_types.h
@@ -32,7 +32,8 @@ struct drm_i915_gem_object_ops {
 #define I915_GEM_OBJECT_HAS_STRUCT_PAGE	BIT(0)
 #define I915_GEM_OBJECT_IS_SHRINKABLE	BIT(1)
 #define I915_GEM_OBJECT_IS_PROXY	BIT(2)
-#define I915_GEM_OBJECT_ASYNC_CANCEL	BIT(3)
+#define I915_GEM_OBJECT_NO_GGTT		BIT(3)
+#define I915_GEM_OBJECT_ASYNC_CANCEL	BIT(4)
 
 	/* Interface between the GEM object and its backing storage.
 	 * get_pages() is called once prior to the use of the associated set
diff --git a/drivers/gpu/drm/i915/gem/i915_gem_userptr.c b/drivers/gpu/drm/i915/gem/i915_gem_userptr.c
index 11b231c187c5..6b3b50f0f6d9 100644
--- a/drivers/gpu/drm/i915/gem/i915_gem_userptr.c
+++ b/drivers/gpu/drm/i915/gem/i915_gem_userptr.c
@@ -702,6 +702,7 @@ i915_gem_userptr_dmabuf_export(struct drm_i915_gem_object *obj)
 static const struct drm_i915_gem_object_ops i915_gem_userptr_ops = {
 	.flags = I915_GEM_OBJECT_HAS_STRUCT_PAGE |
 		 I915_GEM_OBJECT_IS_SHRINKABLE |
+		 I915_GEM_OBJECT_NO_GGTT |
 		 I915_GEM_OBJECT_ASYNC_CANCEL,
 	.get_pages = i915_gem_userptr_get_pages,
 	.put_pages = i915_gem_userptr_put_pages,
diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
index e2897a666225..b8fcf3575a6d 100644
--- a/drivers/gpu/drm/i915/i915_gem.c
+++ b/drivers/gpu/drm/i915/i915_gem.c
@@ -970,6 +970,9 @@ i915_gem_object_ggtt_pin(struct drm_i915_gem_object *obj,
 
 	lockdep_assert_held(&obj->base.dev->struct_mutex);
 
+	if (i915_gem_object_never_bind_ggtt(obj))
+		return ERR_PTR(-ENODEV);
+
 	if (flags & PIN_MAPPABLE &&
 	    (!view || view->type == I915_GGTT_VIEW_NORMAL)) {
 		/* If the required space is larger than the available
-- 
2.23.0


^ permalink raw reply related	[flat|nested] 14+ messages in thread

* ✗ Fi.CI.CHECKPATCH: warning for drm/i915/userptr: Never allow userptr into the mappable GGTT
  2019-09-27 16:34 [PATCH] drm/i915/userptr: Never allow userptr into the mappable GGTT Chris Wilson
@ 2019-09-27 16:42 ` Patchwork
  2019-09-27 17:05 ` ✓ Fi.CI.BAT: success " Patchwork
                   ` (9 subsequent siblings)
  10 siblings, 0 replies; 14+ messages in thread
From: Patchwork @ 2019-09-27 16:42 UTC (permalink / raw)
  To: Chris Wilson; +Cc: intel-gfx

== Series Details ==

Series: drm/i915/userptr: Never allow userptr into the mappable GGTT
URL   : https://patchwork.freedesktop.org/series/67349/
State : warning

== Summary ==

$ dim checkpatch origin/drm-tip
e7fbf6cde45c drm/i915/userptr: Never allow userptr into the mappable GGTT
-:25: WARNING:COMMIT_LOG_LONG_LINE: Possible unwrapped commit description (prefer a maximum 75 chars per line)
#25: 
<4>[  246.794030] 000000003f565be6 (&dev->struct_mutex/1){+.+.}, at: userptr_mn_invalidate_range_start+0x18f/0x220 [i915]

total: 0 errors, 1 warnings, 0 checks, 37 lines checked

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 14+ messages in thread

* ✓ Fi.CI.BAT: success for drm/i915/userptr: Never allow userptr into the mappable GGTT
  2019-09-27 16:34 [PATCH] drm/i915/userptr: Never allow userptr into the mappable GGTT Chris Wilson
  2019-09-27 16:42 ` ✗ Fi.CI.CHECKPATCH: warning for " Patchwork
@ 2019-09-27 17:05 ` Patchwork
  2019-09-28  8:05 ` ✗ Fi.CI.IGT: failure " Patchwork
                   ` (8 subsequent siblings)
  10 siblings, 0 replies; 14+ messages in thread
From: Patchwork @ 2019-09-27 17:05 UTC (permalink / raw)
  To: Chris Wilson; +Cc: intel-gfx

== Series Details ==

Series: drm/i915/userptr: Never allow userptr into the mappable GGTT
URL   : https://patchwork.freedesktop.org/series/67349/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_6969 -> Patchwork_14568
====================================================

Summary
-------

  **SUCCESS**

  No regressions found.

  External URL: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14568/index.html

Known issues
------------

  Here are the changes found in Patchwork_14568 that come from known issues:

### IGT changes ###

#### Issues hit ####

  * igt@prime_busy@basic-wait-before-default:
    - fi-icl-u3:          [PASS][1] -> [DMESG-WARN][2] ([fdo#107724])
   [1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6969/fi-icl-u3/igt@prime_busy@basic-wait-before-default.html
   [2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14568/fi-icl-u3/igt@prime_busy@basic-wait-before-default.html

  
#### Possible fixes ####

  * igt@gem_ctx_switch@legacy-render:
    - fi-bxt-dsi:         [INCOMPLETE][3] ([fdo#103927] / [fdo#111381]) -> [PASS][4]
   [3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6969/fi-bxt-dsi/igt@gem_ctx_switch@legacy-render.html
   [4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14568/fi-bxt-dsi/igt@gem_ctx_switch@legacy-render.html

  * igt@gem_exec_suspend@basic-s3:
    - fi-blb-e6850:       [INCOMPLETE][5] ([fdo#107718]) -> [PASS][6]
   [5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6969/fi-blb-e6850/igt@gem_exec_suspend@basic-s3.html
   [6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14568/fi-blb-e6850/igt@gem_exec_suspend@basic-s3.html

  * igt@i915_module_load@reload:
    - fi-icl-u3:          [DMESG-WARN][7] ([fdo#107724] / [fdo#111214]) -> [PASS][8]
   [7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6969/fi-icl-u3/igt@i915_module_load@reload.html
   [8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14568/fi-icl-u3/igt@i915_module_load@reload.html

  * igt@i915_pm_rpm@basic-pci-d3-state:
    - fi-skl-6600u:       [FAIL][9] ([fdo#107707]) -> [PASS][10]
   [9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6969/fi-skl-6600u/igt@i915_pm_rpm@basic-pci-d3-state.html
   [10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14568/fi-skl-6600u/igt@i915_pm_rpm@basic-pci-d3-state.html

  * igt@i915_pm_rpm@module-reload:
    - fi-icl-u3:          [DMESG-WARN][11] ([fdo#107724]) -> [PASS][12]
   [11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6969/fi-icl-u3/igt@i915_pm_rpm@module-reload.html
   [12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14568/fi-icl-u3/igt@i915_pm_rpm@module-reload.html

  
#### Warnings ####

  * igt@kms_chamelium@hdmi-hpd-fast:
    - fi-kbl-7500u:       [FAIL][13] ([fdo#111407]) -> [FAIL][14] ([fdo#111045] / [fdo#111096])
   [13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6969/fi-kbl-7500u/igt@kms_chamelium@hdmi-hpd-fast.html
   [14]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14568/fi-kbl-7500u/igt@kms_chamelium@hdmi-hpd-fast.html

  
  {name}: This element is suppressed. This means it is ignored when computing
          the status of the difference (SUCCESS, WARNING, or FAILURE).

  [fdo#103927]: https://bugs.freedesktop.org/show_bug.cgi?id=103927
  [fdo#107707]: https://bugs.freedesktop.org/show_bug.cgi?id=107707
  [fdo#107718]: https://bugs.freedesktop.org/show_bug.cgi?id=107718
  [fdo#107724]: https://bugs.freedesktop.org/show_bug.cgi?id=107724
  [fdo#111045]: https://bugs.freedesktop.org/show_bug.cgi?id=111045
  [fdo#111096]: https://bugs.freedesktop.org/show_bug.cgi?id=111096
  [fdo#111214]: https://bugs.freedesktop.org/show_bug.cgi?id=111214
  [fdo#111381]: https://bugs.freedesktop.org/show_bug.cgi?id=111381
  [fdo#111407]: https://bugs.freedesktop.org/show_bug.cgi?id=111407


Participating hosts (51 -> 45)
------------------------------

  Additional (2): fi-hsw-peppy fi-skl-guc 
  Missing    (8): fi-ilk-m540 fi-hsw-4200u fi-byt-squawks fi-bsw-cyan fi-pnv-d510 fi-icl-y fi-byt-clapper fi-bdw-samus 


Build changes
-------------

  * CI: CI-20190529 -> None
  * Linux: CI_DRM_6969 -> Patchwork_14568

  CI-20190529: 20190529
  CI_DRM_6969: ad0d6a2a5bb90cccef673bf3722a8ee08647cf7f @ git://anongit.freedesktop.org/gfx-ci/linux
  IGT_5206: 5a6c68568def840cd720f18fc66f529a89f84675 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
  Patchwork_14568: e7fbf6cde45c8cf137b60ab119d7400609829120 @ git://anongit.freedesktop.org/gfx-ci/linux


== Linux commits ==

e7fbf6cde45c drm/i915/userptr: Never allow userptr into the mappable GGTT

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14568/index.html
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 14+ messages in thread

* ✗ Fi.CI.IGT: failure for drm/i915/userptr: Never allow userptr into the mappable GGTT
  2019-09-27 16:34 [PATCH] drm/i915/userptr: Never allow userptr into the mappable GGTT Chris Wilson
  2019-09-27 16:42 ` ✗ Fi.CI.CHECKPATCH: warning for " Patchwork
  2019-09-27 17:05 ` ✓ Fi.CI.BAT: success " Patchwork
@ 2019-09-28  8:05 ` Patchwork
  2019-09-28  8:25 ` [PATCH v2] " Chris Wilson
                   ` (7 subsequent siblings)
  10 siblings, 0 replies; 14+ messages in thread
From: Patchwork @ 2019-09-28  8:05 UTC (permalink / raw)
  To: Chris Wilson; +Cc: intel-gfx

== Series Details ==

Series: drm/i915/userptr: Never allow userptr into the mappable GGTT
URL   : https://patchwork.freedesktop.org/series/67349/
State : failure

== Summary ==

CI Bug Log - changes from CI_DRM_6969_full -> Patchwork_14568_full
====================================================

Summary
-------

  **FAILURE**

  Serious unknown changes coming with Patchwork_14568_full absolutely need to be
  verified manually.
  
  If you think the reported changes have nothing to do with the changes
  introduced in Patchwork_14568_full, please notify your bug team to allow them
  to document this new failure mode, which will reduce false positives in CI.

  

Possible new issues
-------------------

  Here are the unknown changes that may have been introduced in Patchwork_14568_full:

### IGT changes ###

#### Possible regressions ####

  * igt@gem_userptr_blits@dmabuf-sync:
    - shard-kbl:          [PASS][1] -> [CRASH][2] +3 similar issues
   [1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6969/shard-kbl1/igt@gem_userptr_blits@dmabuf-sync.html
   [2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14568/shard-kbl7/igt@gem_userptr_blits@dmabuf-sync.html

  * igt@gem_userptr_blits@process-exit-gtt:
    - shard-hsw:          [PASS][3] -> [CRASH][4] +3 similar issues
   [3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6969/shard-hsw1/igt@gem_userptr_blits@process-exit-gtt.html
   [4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14568/shard-hsw6/igt@gem_userptr_blits@process-exit-gtt.html
    - shard-iclb:         [PASS][5] -> [CRASH][6] +2 similar issues
   [5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6969/shard-iclb8/igt@gem_userptr_blits@process-exit-gtt.html
   [6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14568/shard-iclb7/igt@gem_userptr_blits@process-exit-gtt.html

  * igt@gem_userptr_blits@process-exit-gtt-busy:
    - shard-skl:          [PASS][7] -> [CRASH][8] +2 similar issues
   [7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6969/shard-skl3/igt@gem_userptr_blits@process-exit-gtt-busy.html
   [8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14568/shard-skl7/igt@gem_userptr_blits@process-exit-gtt-busy.html
    - shard-snb:          [PASS][9] -> [CRASH][10] +3 similar issues
   [9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6969/shard-snb2/igt@gem_userptr_blits@process-exit-gtt-busy.html
   [10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14568/shard-snb2/igt@gem_userptr_blits@process-exit-gtt-busy.html

  * igt@gem_userptr_blits@readonly-mmap-unsync:
    - shard-glk:          [PASS][11] -> [DMESG-FAIL][12]
   [11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6969/shard-glk5/igt@gem_userptr_blits@readonly-mmap-unsync.html
   [12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14568/shard-glk3/igt@gem_userptr_blits@readonly-mmap-unsync.html

  
Known issues
------------

  Here are the changes found in Patchwork_14568_full that come from known issues:

### IGT changes ###

#### Issues hit ####

  * igt@gem_exec_schedule@preempt-queue-bsd:
    - shard-iclb:         [PASS][13] -> [SKIP][14] ([fdo#111325]) +2 similar issues
   [13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6969/shard-iclb5/igt@gem_exec_schedule@preempt-queue-bsd.html
   [14]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14568/shard-iclb4/igt@gem_exec_schedule@preempt-queue-bsd.html

  * igt@gem_pread@snoop:
    - shard-apl:          [PASS][15] -> [INCOMPLETE][16] ([fdo#103927]) +2 similar issues
   [15]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6969/shard-apl3/igt@gem_pread@snoop.html
   [16]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14568/shard-apl6/igt@gem_pread@snoop.html

  * igt@gem_softpin@noreloc-s3:
    - shard-skl:          [PASS][17] -> [INCOMPLETE][18] ([fdo#104108])
   [17]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6969/shard-skl4/igt@gem_softpin@noreloc-s3.html
   [18]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14568/shard-skl8/igt@gem_softpin@noreloc-s3.html

  * igt@kms_cursor_legacy@cursor-vs-flip-toggle:
    - shard-hsw:          [PASS][19] -> [FAIL][20] ([fdo#103355])
   [19]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6969/shard-hsw1/igt@kms_cursor_legacy@cursor-vs-flip-toggle.html
   [20]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14568/shard-hsw6/igt@kms_cursor_legacy@cursor-vs-flip-toggle.html

  * igt@kms_frontbuffer_tracking@fbc-stridechange:
    - shard-iclb:         [PASS][21] -> [FAIL][22] ([fdo#103167]) +4 similar issues
   [21]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6969/shard-iclb5/igt@kms_frontbuffer_tracking@fbc-stridechange.html
   [22]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14568/shard-iclb7/igt@kms_frontbuffer_tracking@fbc-stridechange.html

  * igt@kms_plane_alpha_blend@pipe-c-coverage-7efc:
    - shard-skl:          [PASS][23] -> [FAIL][24] ([fdo#108145] / [fdo#110403])
   [23]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6969/shard-skl4/igt@kms_plane_alpha_blend@pipe-c-coverage-7efc.html
   [24]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14568/shard-skl8/igt@kms_plane_alpha_blend@pipe-c-coverage-7efc.html

  * igt@kms_psr@psr2_primary_mmap_cpu:
    - shard-iclb:         [PASS][25] -> [SKIP][26] ([fdo#109441])
   [25]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6969/shard-iclb2/igt@kms_psr@psr2_primary_mmap_cpu.html
   [26]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14568/shard-iclb7/igt@kms_psr@psr2_primary_mmap_cpu.html

  * igt@kms_vblank@pipe-a-ts-continuation-suspend:
    - shard-apl:          [PASS][27] -> [DMESG-WARN][28] ([fdo#108566]) +2 similar issues
   [27]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6969/shard-apl8/igt@kms_vblank@pipe-a-ts-continuation-suspend.html
   [28]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14568/shard-apl8/igt@kms_vblank@pipe-a-ts-continuation-suspend.html

  * igt@prime_busy@hang-bsd2:
    - shard-iclb:         [PASS][29] -> [SKIP][30] ([fdo#109276]) +13 similar issues
   [29]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6969/shard-iclb1/igt@prime_busy@hang-bsd2.html
   [30]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14568/shard-iclb6/igt@prime_busy@hang-bsd2.html

  
#### Possible fixes ####

  * igt@gem_ctx_shared@exec-single-timeline-bsd:
    - shard-iclb:         [SKIP][31] ([fdo#110841]) -> [PASS][32]
   [31]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6969/shard-iclb4/igt@gem_ctx_shared@exec-single-timeline-bsd.html
   [32]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14568/shard-iclb3/igt@gem_ctx_shared@exec-single-timeline-bsd.html

  * igt@gem_exec_schedule@preempt-queue-bsd1:
    - shard-iclb:         [SKIP][33] ([fdo#109276]) -> [PASS][34] +17 similar issues
   [33]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6969/shard-iclb5/igt@gem_exec_schedule@preempt-queue-bsd1.html
   [34]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14568/shard-iclb2/igt@gem_exec_schedule@preempt-queue-bsd1.html

  * igt@gem_exec_schedule@reorder-wide-bsd:
    - shard-iclb:         [SKIP][35] ([fdo#111325]) -> [PASS][36] +6 similar issues
   [35]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6969/shard-iclb4/igt@gem_exec_schedule@reorder-wide-bsd.html
   [36]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14568/shard-iclb3/igt@gem_exec_schedule@reorder-wide-bsd.html

  * igt@gem_workarounds@suspend-resume-context:
    - shard-apl:          [DMESG-WARN][37] ([fdo#108566]) -> [PASS][38] +4 similar issues
   [37]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6969/shard-apl6/igt@gem_workarounds@suspend-resume-context.html
   [38]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14568/shard-apl2/igt@gem_workarounds@suspend-resume-context.html

  * igt@kms_flip@2x-dpms-vs-vblank-race-interruptible:
    - shard-glk:          [FAIL][39] ([fdo#111609]) -> [PASS][40]
   [39]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6969/shard-glk3/igt@kms_flip@2x-dpms-vs-vblank-race-interruptible.html
   [40]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14568/shard-glk6/igt@kms_flip@2x-dpms-vs-vblank-race-interruptible.html

  * igt@kms_flip_tiling@flip-to-x-tiled:
    - shard-iclb:         [FAIL][41] ([fdo#108134]) -> [PASS][42]
   [41]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6969/shard-iclb6/igt@kms_flip_tiling@flip-to-x-tiled.html
   [42]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14568/shard-iclb8/igt@kms_flip_tiling@flip-to-x-tiled.html

  * igt@kms_frontbuffer_tracking@fbc-1p-primscrn-shrfb-plflip-blt:
    - shard-iclb:         [FAIL][43] ([fdo#103167]) -> [PASS][44] +1 similar issue
   [43]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6969/shard-iclb1/igt@kms_frontbuffer_tracking@fbc-1p-primscrn-shrfb-plflip-blt.html
   [44]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14568/shard-iclb6/igt@kms_frontbuffer_tracking@fbc-1p-primscrn-shrfb-plflip-blt.html

  * igt@kms_psr@psr2_cursor_mmap_cpu:
    - shard-iclb:         [SKIP][45] ([fdo#109441]) -> [PASS][46] +1 similar issue
   [45]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6969/shard-iclb8/igt@kms_psr@psr2_cursor_mmap_cpu.html
   [46]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14568/shard-iclb2/igt@kms_psr@psr2_cursor_mmap_cpu.html

  * igt@kms_vblank@pipe-c-ts-continuation-suspend:
    - shard-iclb:         [DMESG-WARN][47] ([fdo#111764]) -> [PASS][48]
   [47]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6969/shard-iclb2/igt@kms_vblank@pipe-c-ts-continuation-suspend.html
   [48]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14568/shard-iclb7/igt@kms_vblank@pipe-c-ts-continuation-suspend.html

  * igt@perf@blocking:
    - shard-skl:          [FAIL][49] ([fdo#110728]) -> [PASS][50]
   [49]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6969/shard-skl7/igt@perf@blocking.html
   [50]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14568/shard-skl3/igt@perf@blocking.html

  
#### Warnings ####

  * igt@gem_mocs_settings@mocs-rc6-bsd2:
    - shard-iclb:         [SKIP][51] ([fdo#109276]) -> [FAIL][52] ([fdo#111330])
   [51]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6969/shard-iclb3/igt@gem_mocs_settings@mocs-rc6-bsd2.html
   [52]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14568/shard-iclb4/igt@gem_mocs_settings@mocs-rc6-bsd2.html

  
  [fdo#103167]: https://bugs.freedesktop.org/show_bug.cgi?id=103167
  [fdo#103355]: https://bugs.freedesktop.org/show_bug.cgi?id=103355
  [fdo#103927]: https://bugs.freedesktop.org/show_bug.cgi?id=103927
  [fdo#104108]: https://bugs.freedesktop.org/show_bug.cgi?id=104108
  [fdo#108134]: https://bugs.freedesktop.org/show_bug.cgi?id=108134
  [fdo#108145]: https://bugs.freedesktop.org/show_bug.cgi?id=108145
  [fdo#108566]: https://bugs.freedesktop.org/show_bug.cgi?id=108566
  [fdo#109276]: https://bugs.freedesktop.org/show_bug.cgi?id=109276
  [fdo#109441]: https://bugs.freedesktop.org/show_bug.cgi?id=109441
  [fdo#110403]: https://bugs.freedesktop.org/show_bug.cgi?id=110403
  [fdo#110728]: https://bugs.freedesktop.org/show_bug.cgi?id=110728
  [fdo#110841]: https://bugs.freedesktop.org/show_bug.cgi?id=110841
  [fdo#111325]: https://bugs.freedesktop.org/show_bug.cgi?id=111325
  [fdo#111330]: https://bugs.freedesktop.org/show_bug.cgi?id=111330
  [fdo#111609]: https://bugs.freedesktop.org/show_bug.cgi?id=111609
  [fdo#111764]: https://bugs.freedesktop.org/show_bug.cgi?id=111764


Participating hosts (16 -> 10)
------------------------------

  Missing    (6): shard-tglb1 shard-tglb2 shard-tglb3 shard-tglb4 shard-tglb5 shard-tglb6 


Build changes
-------------

  * CI: CI-20190529 -> None
  * Linux: CI_DRM_6969 -> Patchwork_14568

  CI-20190529: 20190529
  CI_DRM_6969: ad0d6a2a5bb90cccef673bf3722a8ee08647cf7f @ git://anongit.freedesktop.org/gfx-ci/linux
  IGT_5206: 5a6c68568def840cd720f18fc66f529a89f84675 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
  Patchwork_14568: e7fbf6cde45c8cf137b60ab119d7400609829120 @ git://anongit.freedesktop.org/gfx-ci/linux
  piglit_4509: fdc5a4ca11124ab8413c7988896eec4c97336694 @ git://anongit.freedesktop.org/piglit

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14568/
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [PATCH v2] drm/i915/userptr: Never allow userptr into the mappable GGTT
  2019-09-27 16:34 [PATCH] drm/i915/userptr: Never allow userptr into the mappable GGTT Chris Wilson
                   ` (2 preceding siblings ...)
  2019-09-28  8:05 ` ✗ Fi.CI.IGT: failure " Patchwork
@ 2019-09-28  8:25 ` Chris Wilson
  2019-09-30 10:33   ` [Intel-gfx] " Tvrtko Ursulin
  2019-09-28  8:35 ` ✗ Fi.CI.CHECKPATCH: warning for drm/i915/userptr: Never allow userptr into the mappable GGTT (rev2) Patchwork
                   ` (6 subsequent siblings)
  10 siblings, 1 reply; 14+ messages in thread
From: Chris Wilson @ 2019-09-28  8:25 UTC (permalink / raw)
  To: intel-gfx; +Cc: Chris Wilson, Tvrtko Ursulin, Daniel Vetter, stable

Daniel Vetter uncovered a nasty cycle in using the mmu-notifiers to
invalidate userptr objects which also happen to be pulled into GGTT
mmaps. That is when we unbind the userptr object (on mmu invalidation),
we revoke all CPU mmaps, which may then recurse into mmu invalidation.

We looked for ways of breaking the cycle, but the revocation on
invalidation is required and cannot be avoided. The only solution we
could see was to not allow such GGTT bindings of userptr objects in the
first place. In practice, no one really wants to use a GGTT mmapping of
a CPU pointer...

Just before Daniel's explosive lockdep patches land in rc1, we got a
genuine blip from CI:

<4>[  246.793958] ======================================================
<4>[  246.793972] WARNING: possible circular locking dependency detected
<4>[  246.793989] 5.3.0-gbd6c56f50d15-drmtip_372+ #1 Tainted: G     U
<4>[  246.794003] ------------------------------------------------------
<4>[  246.794017] kswapd0/145 is trying to acquire lock:
<4>[  246.794030] 000000003f565be6 (&dev->struct_mutex/1){+.+.}, at: userptr_mn_invalidate_range_start+0x18f/0x220 [i915]
<4>[  246.794250]
                  but task is already holding lock:
<4>[  246.794263] 000000001799cef9 (&anon_vma->rwsem){++++}, at: page_lock_anon_vma_read+0xe6/0x2a0
<4>[  246.794291]
                  which lock already depends on the new lock.

<4>[  246.794307]
                  the existing dependency chain (in reverse order) is:
<4>[  246.794322]
                  -> #3 (&anon_vma->rwsem){++++}:
<4>[  246.794344]        down_write+0x33/0x70
<4>[  246.794357]        __vma_adjust+0x3d9/0x7b0
<4>[  246.794370]        __split_vma+0x16a/0x180
<4>[  246.794385]        mprotect_fixup+0x2a5/0x320
<4>[  246.794399]        do_mprotect_pkey+0x208/0x2e0
<4>[  246.794413]        __x64_sys_mprotect+0x16/0x20
<4>[  246.794429]        do_syscall_64+0x55/0x1c0
<4>[  246.794443]        entry_SYSCALL_64_after_hwframe+0x49/0xbe
<4>[  246.794456]
                  -> #2 (&mapping->i_mmap_rwsem){++++}:
<4>[  246.794478]        down_write+0x33/0x70
<4>[  246.794493]        unmap_mapping_pages+0x48/0x130
<4>[  246.794519]        i915_vma_revoke_mmap+0x81/0x1b0 [i915]
<4>[  246.794519]        i915_vma_unbind+0x11d/0x4a0 [i915]
<4>[  246.794519]        i915_vma_destroy+0x31/0x300 [i915]
<4>[  246.794519]        __i915_gem_free_objects+0xb8/0x4b0 [i915]
<4>[  246.794519]        drm_file_free.part.0+0x1e6/0x290
<4>[  246.794519]        drm_release+0xa6/0xe0
<4>[  246.794519]        __fput+0xc2/0x250
<4>[  246.794519]        task_work_run+0x82/0xb0
<4>[  246.794519]        do_exit+0x35b/0xdb0
<4>[  246.794519]        do_group_exit+0x34/0xb0
<4>[  246.794519]        __x64_sys_exit_group+0xf/0x10
<4>[  246.794519]        do_syscall_64+0x55/0x1c0
<4>[  246.794519]        entry_SYSCALL_64_after_hwframe+0x49/0xbe
<4>[  246.794519]
                  -> #1 (&vm->mutex){+.+.}:
<4>[  246.794519]        i915_gem_shrinker_taints_mutex+0x6d/0xe0 [i915]
<4>[  246.794519]        i915_address_space_init+0x9f/0x160 [i915]
<4>[  246.794519]        i915_ggtt_init_hw+0x55/0x170 [i915]
<4>[  246.794519]        i915_driver_probe+0xc9f/0x1620 [i915]
<4>[  246.794519]        i915_pci_probe+0x43/0x1b0 [i915]
<4>[  246.794519]        pci_device_probe+0x9e/0x120
<4>[  246.794519]        really_probe+0xea/0x3d0
<4>[  246.794519]        driver_probe_device+0x10b/0x120
<4>[  246.794519]        device_driver_attach+0x4a/0x50
<4>[  246.794519]        __driver_attach+0x97/0x130
<4>[  246.794519]        bus_for_each_dev+0x74/0xc0
<4>[  246.794519]        bus_add_driver+0x13f/0x210
<4>[  246.794519]        driver_register+0x56/0xe0
<4>[  246.794519]        do_one_initcall+0x58/0x300
<4>[  246.794519]        do_init_module+0x56/0x1f6
<4>[  246.794519]        load_module+0x25bd/0x2a40
<4>[  246.794519]        __se_sys_finit_module+0xd3/0xf0
<4>[  246.794519]        do_syscall_64+0x55/0x1c0
<4>[  246.794519]        entry_SYSCALL_64_after_hwframe+0x49/0xbe
<4>[  246.794519]
                  -> #0 (&dev->struct_mutex/1){+.+.}:
<4>[  246.794519]        __lock_acquire+0x15d8/0x1e90
<4>[  246.794519]        lock_acquire+0xa6/0x1c0
<4>[  246.794519]        __mutex_lock+0x9d/0x9b0
<4>[  246.794519]        userptr_mn_invalidate_range_start+0x18f/0x220 [i915]
<4>[  246.794519]        __mmu_notifier_invalidate_range_start+0x85/0x110
<4>[  246.794519]        try_to_unmap_one+0x76b/0x860
<4>[  246.794519]        rmap_walk_anon+0x104/0x280
<4>[  246.794519]        try_to_unmap+0xc0/0xf0
<4>[  246.794519]        shrink_page_list+0x561/0xc10
<4>[  246.794519]        shrink_inactive_list+0x220/0x440
<4>[  246.794519]        shrink_node_memcg+0x36e/0x740
<4>[  246.794519]        shrink_node+0xcb/0x490
<4>[  246.794519]        balance_pgdat+0x241/0x580
<4>[  246.794519]        kswapd+0x16c/0x530
<4>[  246.794519]        kthread+0x119/0x130
<4>[  246.794519]        ret_from_fork+0x24/0x50
<4>[  246.794519]
                  other info that might help us debug this:

<4>[  246.794519] Chain exists of:
                    &dev->struct_mutex/1 --> &mapping->i_mmap_rwsem --> &anon_vma->rwsem

<4>[  246.794519]  Possible unsafe locking scenario:

<4>[  246.794519]        CPU0                    CPU1
<4>[  246.794519]        ----                    ----
<4>[  246.794519]   lock(&anon_vma->rwsem);
<4>[  246.794519]                                lock(&mapping->i_mmap_rwsem);
<4>[  246.794519]                                lock(&anon_vma->rwsem);
<4>[  246.794519]   lock(&dev->struct_mutex/1);
<4>[  246.794519]
                   *** DEADLOCK ***

v2: Say no to mmap_ioctl

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=111744
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: stable@vger.kernel.org
---
 drivers/gpu/drm/i915/gem/i915_gem_mman.c         | 7 +++++++
 drivers/gpu/drm/i915/gem/i915_gem_object.h       | 6 ++++++
 drivers/gpu/drm/i915/gem/i915_gem_object_types.h | 3 ++-
 drivers/gpu/drm/i915/gem/i915_gem_userptr.c      | 1 +
 drivers/gpu/drm/i915/i915_gem.c                  | 3 +++
 5 files changed, 19 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/gem/i915_gem_mman.c b/drivers/gpu/drm/i915/gem/i915_gem_mman.c
index 860b751c51f1..dd0c2840ba4d 100644
--- a/drivers/gpu/drm/i915/gem/i915_gem_mman.c
+++ b/drivers/gpu/drm/i915/gem/i915_gem_mman.c
@@ -343,6 +343,7 @@ vm_fault_t i915_gem_fault(struct vm_fault *vmf)
 		/* fallthrough */
 	case -EIO: /* shmemfs failure from swap device */
 	case -EFAULT: /* purged object */
+	case -ENODEV: /* bad object, how did you get here! */
 		return VM_FAULT_SIGBUS;
 
 	case -ENOSPC: /* shmemfs allocation failure */
@@ -466,10 +467,16 @@ i915_gem_mmap_gtt(struct drm_file *file,
 	if (!obj)
 		return -ENOENT;
 
+	if (i915_gem_object_never_bind_ggtt(obj)) {
+		ret = -ENODEV;
+		goto out;
+	}
+
 	ret = create_mmap_offset(obj);
 	if (ret == 0)
 		*offset = drm_vma_node_offset_addr(&obj->base.vma_node);
 
+out:
 	i915_gem_object_put(obj);
 	return ret;
 }
diff --git a/drivers/gpu/drm/i915/gem/i915_gem_object.h b/drivers/gpu/drm/i915/gem/i915_gem_object.h
index 29b9eddc4c7f..aec05f967d9d 100644
--- a/drivers/gpu/drm/i915/gem/i915_gem_object.h
+++ b/drivers/gpu/drm/i915/gem/i915_gem_object.h
@@ -152,6 +152,12 @@ i915_gem_object_is_proxy(const struct drm_i915_gem_object *obj)
 	return obj->ops->flags & I915_GEM_OBJECT_IS_PROXY;
 }
 
+static inline bool
+i915_gem_object_never_bind_ggtt(const struct drm_i915_gem_object *obj)
+{
+	return obj->ops->flags & I915_GEM_OBJECT_NO_GGTT;
+}
+
 static inline bool
 i915_gem_object_needs_async_cancel(const struct drm_i915_gem_object *obj)
 {
diff --git a/drivers/gpu/drm/i915/gem/i915_gem_object_types.h b/drivers/gpu/drm/i915/gem/i915_gem_object_types.h
index d695f187b790..e1aab2fd1cd9 100644
--- a/drivers/gpu/drm/i915/gem/i915_gem_object_types.h
+++ b/drivers/gpu/drm/i915/gem/i915_gem_object_types.h
@@ -32,7 +32,8 @@ struct drm_i915_gem_object_ops {
 #define I915_GEM_OBJECT_HAS_STRUCT_PAGE	BIT(0)
 #define I915_GEM_OBJECT_IS_SHRINKABLE	BIT(1)
 #define I915_GEM_OBJECT_IS_PROXY	BIT(2)
-#define I915_GEM_OBJECT_ASYNC_CANCEL	BIT(3)
+#define I915_GEM_OBJECT_NO_GGTT		BIT(3)
+#define I915_GEM_OBJECT_ASYNC_CANCEL	BIT(4)
 
 	/* Interface between the GEM object and its backing storage.
 	 * get_pages() is called once prior to the use of the associated set
diff --git a/drivers/gpu/drm/i915/gem/i915_gem_userptr.c b/drivers/gpu/drm/i915/gem/i915_gem_userptr.c
index 11b231c187c5..6b3b50f0f6d9 100644
--- a/drivers/gpu/drm/i915/gem/i915_gem_userptr.c
+++ b/drivers/gpu/drm/i915/gem/i915_gem_userptr.c
@@ -702,6 +702,7 @@ i915_gem_userptr_dmabuf_export(struct drm_i915_gem_object *obj)
 static const struct drm_i915_gem_object_ops i915_gem_userptr_ops = {
 	.flags = I915_GEM_OBJECT_HAS_STRUCT_PAGE |
 		 I915_GEM_OBJECT_IS_SHRINKABLE |
+		 I915_GEM_OBJECT_NO_GGTT |
 		 I915_GEM_OBJECT_ASYNC_CANCEL,
 	.get_pages = i915_gem_userptr_get_pages,
 	.put_pages = i915_gem_userptr_put_pages,
diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
index 3d3fda4cae99..1426e506700d 100644
--- a/drivers/gpu/drm/i915/i915_gem.c
+++ b/drivers/gpu/drm/i915/i915_gem.c
@@ -970,6 +970,9 @@ i915_gem_object_ggtt_pin(struct drm_i915_gem_object *obj,
 
 	lockdep_assert_held(&obj->base.dev->struct_mutex);
 
+	if (i915_gem_object_never_bind_ggtt(obj))
+		return ERR_PTR(-ENODEV);
+
 	if (flags & PIN_MAPPABLE &&
 	    (!view || view->type == I915_GGTT_VIEW_NORMAL)) {
 		/* If the required space is larger than the available
-- 
2.23.0


^ permalink raw reply related	[flat|nested] 14+ messages in thread

* ✗ Fi.CI.CHECKPATCH: warning for drm/i915/userptr: Never allow userptr into the mappable GGTT (rev2)
  2019-09-27 16:34 [PATCH] drm/i915/userptr: Never allow userptr into the mappable GGTT Chris Wilson
                   ` (3 preceding siblings ...)
  2019-09-28  8:25 ` [PATCH v2] " Chris Wilson
@ 2019-09-28  8:35 ` Patchwork
  2019-09-28  9:25 ` ✓ Fi.CI.BAT: success " Patchwork
                   ` (5 subsequent siblings)
  10 siblings, 0 replies; 14+ messages in thread
From: Patchwork @ 2019-09-28  8:35 UTC (permalink / raw)
  To: Chris Wilson; +Cc: intel-gfx

== Series Details ==

Series: drm/i915/userptr: Never allow userptr into the mappable GGTT (rev2)
URL   : https://patchwork.freedesktop.org/series/67349/
State : warning

== Summary ==

$ dim checkpatch origin/drm-tip
da284ec35d7a drm/i915/userptr: Never allow userptr into the mappable GGTT
-:25: WARNING:COMMIT_LOG_LONG_LINE: Possible unwrapped commit description (prefer a maximum 75 chars per line)
#25: 
<4>[  246.794030] 000000003f565be6 (&dev->struct_mutex/1){+.+.}, at: userptr_mn_invalidate_range_start+0x18f/0x220 [i915]

total: 0 errors, 1 warnings, 0 checks, 60 lines checked

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 14+ messages in thread

* ✓ Fi.CI.BAT: success for drm/i915/userptr: Never allow userptr into the mappable GGTT (rev2)
  2019-09-27 16:34 [PATCH] drm/i915/userptr: Never allow userptr into the mappable GGTT Chris Wilson
                   ` (4 preceding siblings ...)
  2019-09-28  8:35 ` ✗ Fi.CI.CHECKPATCH: warning for drm/i915/userptr: Never allow userptr into the mappable GGTT (rev2) Patchwork
@ 2019-09-28  9:25 ` Patchwork
  2019-09-28 19:13 ` ✗ Fi.CI.IGT: failure " Patchwork
                   ` (4 subsequent siblings)
  10 siblings, 0 replies; 14+ messages in thread
From: Patchwork @ 2019-09-28  9:25 UTC (permalink / raw)
  To: Chris Wilson; +Cc: intel-gfx

== Series Details ==

Series: drm/i915/userptr: Never allow userptr into the mappable GGTT (rev2)
URL   : https://patchwork.freedesktop.org/series/67349/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_6973 -> Patchwork_14578
====================================================

Summary
-------

  **SUCCESS**

  No regressions found.

  External URL: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14578/index.html

Known issues
------------

  Here are the changes found in Patchwork_14578 that come from known issues:

### IGT changes ###

#### Issues hit ####

  * igt@gem_mmap_gtt@basic-write-cpu-read-gtt:
    - fi-icl-u3:          [PASS][1] -> [DMESG-WARN][2] ([fdo#107724]) +1 similar issue
   [1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6973/fi-icl-u3/igt@gem_mmap_gtt@basic-write-cpu-read-gtt.html
   [2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14578/fi-icl-u3/igt@gem_mmap_gtt@basic-write-cpu-read-gtt.html

  * igt@kms_chamelium@hdmi-hpd-fast:
    - fi-icl-u2:          [PASS][3] -> [FAIL][4] ([fdo#109483])
   [3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6973/fi-icl-u2/igt@kms_chamelium@hdmi-hpd-fast.html
   [4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14578/fi-icl-u2/igt@kms_chamelium@hdmi-hpd-fast.html
    - fi-kbl-7500u:       [PASS][5] -> [FAIL][6] ([fdo#111045] / [fdo#111096])
   [5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6973/fi-kbl-7500u/igt@kms_chamelium@hdmi-hpd-fast.html
   [6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14578/fi-kbl-7500u/igt@kms_chamelium@hdmi-hpd-fast.html

  
#### Possible fixes ####

  * igt@gem_mmap@basic-small-bo:
    - fi-icl-u3:          [DMESG-WARN][7] ([fdo#107724]) -> [PASS][8] +1 similar issue
   [7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6973/fi-icl-u3/igt@gem_mmap@basic-small-bo.html
   [8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14578/fi-icl-u3/igt@gem_mmap@basic-small-bo.html

  * igt@i915_selftest@live_gem_contexts:
    - fi-bxt-dsi:         [INCOMPLETE][9] ([fdo#103927]) -> [PASS][10]
   [9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6973/fi-bxt-dsi/igt@i915_selftest@live_gem_contexts.html
   [10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14578/fi-bxt-dsi/igt@i915_selftest@live_gem_contexts.html

  
  [fdo#103927]: https://bugs.freedesktop.org/show_bug.cgi?id=103927
  [fdo#107724]: https://bugs.freedesktop.org/show_bug.cgi?id=107724
  [fdo#109483]: https://bugs.freedesktop.org/show_bug.cgi?id=109483
  [fdo#111045]: https://bugs.freedesktop.org/show_bug.cgi?id=111045
  [fdo#111096]: https://bugs.freedesktop.org/show_bug.cgi?id=111096


Participating hosts (53 -> 45)
------------------------------

  Missing    (8): fi-ilk-m540 fi-hsw-4200u fi-tgl-u2 fi-byt-squawks fi-bsw-cyan fi-icl-y fi-byt-clapper fi-bdw-samus 


Build changes
-------------

  * CI: CI-20190529 -> None
  * Linux: CI_DRM_6973 -> Patchwork_14578

  CI-20190529: 20190529
  CI_DRM_6973: 7462c58bba0fb6e85bd380591c3fd86e298c0f95 @ git://anongit.freedesktop.org/gfx-ci/linux
  IGT_5206: 5a6c68568def840cd720f18fc66f529a89f84675 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
  Patchwork_14578: da284ec35d7a48484badcefd78c6432f6d8d6982 @ git://anongit.freedesktop.org/gfx-ci/linux


== Linux commits ==

da284ec35d7a drm/i915/userptr: Never allow userptr into the mappable GGTT

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14578/index.html
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 14+ messages in thread

* ✗ Fi.CI.IGT: failure for drm/i915/userptr: Never allow userptr into the mappable GGTT (rev2)
  2019-09-27 16:34 [PATCH] drm/i915/userptr: Never allow userptr into the mappable GGTT Chris Wilson
                   ` (5 preceding siblings ...)
  2019-09-28  9:25 ` ✓ Fi.CI.BAT: success " Patchwork
@ 2019-09-28 19:13 ` Patchwork
  2019-09-28 20:03 ` [PATCH] drm/i915/userptr: Never allow userptr into the mappable GGTT Sasha Levin
                   ` (3 subsequent siblings)
  10 siblings, 0 replies; 14+ messages in thread
From: Patchwork @ 2019-09-28 19:13 UTC (permalink / raw)
  To: Chris Wilson; +Cc: intel-gfx

== Series Details ==

Series: drm/i915/userptr: Never allow userptr into the mappable GGTT (rev2)
URL   : https://patchwork.freedesktop.org/series/67349/
State : failure

== Summary ==

CI Bug Log - changes from CI_DRM_6973_full -> Patchwork_14578_full
====================================================

Summary
-------

  **FAILURE**

  Serious unknown changes coming with Patchwork_14578_full absolutely need to be
  verified manually.
  
  If you think the reported changes have nothing to do with the changes
  introduced in Patchwork_14578_full, please notify your bug team to allow them
  to document this new failure mode, which will reduce false positives in CI.

  

Possible new issues
-------------------

  Here are the unknown changes that may have been introduced in Patchwork_14578_full:

### IGT changes ###

#### Possible regressions ####

  * igt@gem_userptr_blits@dmabuf-sync:
    - shard-kbl:          [PASS][1] -> [FAIL][2] +2 similar issues
   [1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6973/shard-kbl2/igt@gem_userptr_blits@dmabuf-sync.html
   [2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14578/shard-kbl7/igt@gem_userptr_blits@dmabuf-sync.html
    - shard-snb:          [PASS][3] -> [FAIL][4] +1 similar issue
   [3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6973/shard-snb2/igt@gem_userptr_blits@dmabuf-sync.html
   [4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14578/shard-snb4/igt@gem_userptr_blits@dmabuf-sync.html

  * igt@gem_userptr_blits@dmabuf-unsync:
    - shard-iclb:         [PASS][5] -> [FAIL][6]
   [5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6973/shard-iclb5/igt@gem_userptr_blits@dmabuf-unsync.html
   [6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14578/shard-iclb8/igt@gem_userptr_blits@dmabuf-unsync.html
    - shard-hsw:          [PASS][7] -> [FAIL][8] +1 similar issue
   [7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6973/shard-hsw2/igt@gem_userptr_blits@dmabuf-unsync.html
   [8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14578/shard-hsw4/igt@gem_userptr_blits@dmabuf-unsync.html

  * igt@gem_userptr_blits@readonly-mmap-unsync:
    - shard-skl:          [PASS][9] -> [FAIL][10] +2 similar issues
   [9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6973/shard-skl5/igt@gem_userptr_blits@readonly-mmap-unsync.html
   [10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14578/shard-skl10/igt@gem_userptr_blits@readonly-mmap-unsync.html
    - shard-apl:          [PASS][11] -> [FAIL][12]
   [11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6973/shard-apl7/igt@gem_userptr_blits@readonly-mmap-unsync.html
   [12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14578/shard-apl4/igt@gem_userptr_blits@readonly-mmap-unsync.html
    - shard-glk:          [PASS][13] -> [FAIL][14]
   [13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6973/shard-glk9/igt@gem_userptr_blits@readonly-mmap-unsync.html
   [14]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14578/shard-glk2/igt@gem_userptr_blits@readonly-mmap-unsync.html

  
Known issues
------------

  Here are the changes found in Patchwork_14578_full that come from known issues:

### IGT changes ###

#### Issues hit ####

  * igt@gem_exec_schedule@independent-bsd2:
    - shard-iclb:         [PASS][15] -> [SKIP][16] ([fdo#109276]) +15 similar issues
   [15]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6973/shard-iclb1/igt@gem_exec_schedule@independent-bsd2.html
   [16]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14578/shard-iclb6/igt@gem_exec_schedule@independent-bsd2.html

  * igt@gem_exec_schedule@preempt-queue-contexts-bsd:
    - shard-iclb:         [PASS][17] -> [SKIP][18] ([fdo#111325])
   [17]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6973/shard-iclb7/igt@gem_exec_schedule@preempt-queue-contexts-bsd.html
   [18]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14578/shard-iclb4/igt@gem_exec_schedule@preempt-queue-contexts-bsd.html

  * igt@gem_workarounds@suspend-resume-context:
    - shard-apl:          [PASS][19] -> [DMESG-WARN][20] ([fdo#108566]) +7 similar issues
   [19]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6973/shard-apl6/igt@gem_workarounds@suspend-resume-context.html
   [20]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14578/shard-apl5/igt@gem_workarounds@suspend-resume-context.html

  * igt@kms_busy@extended-modeset-hang-oldfb-with-reset-render-b:
    - shard-iclb:         [PASS][21] -> [INCOMPLETE][22] ([fdo#107713])
   [21]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6973/shard-iclb3/igt@kms_busy@extended-modeset-hang-oldfb-with-reset-render-b.html
   [22]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14578/shard-iclb7/igt@kms_busy@extended-modeset-hang-oldfb-with-reset-render-b.html

  * igt@kms_cursor_crc@pipe-a-cursor-suspend:
    - shard-snb:          [PASS][23] -> [DMESG-WARN][24] ([fdo#102365])
   [23]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6973/shard-snb2/igt@kms_cursor_crc@pipe-a-cursor-suspend.html
   [24]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14578/shard-snb6/igt@kms_cursor_crc@pipe-a-cursor-suspend.html

  * igt@kms_flip@flip-vs-suspend:
    - shard-skl:          [PASS][25] -> [INCOMPLETE][26] ([fdo#109507])
   [25]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6973/shard-skl6/igt@kms_flip@flip-vs-suspend.html
   [26]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14578/shard-skl1/igt@kms_flip@flip-vs-suspend.html

  * igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-pri-indfb-draw-pwrite:
    - shard-iclb:         [PASS][27] -> [FAIL][28] ([fdo#103167]) +4 similar issues
   [27]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6973/shard-iclb2/igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-pri-indfb-draw-pwrite.html
   [28]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14578/shard-iclb5/igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-pri-indfb-draw-pwrite.html

  * igt@kms_psr@psr2_cursor_mmap_cpu:
    - shard-iclb:         [PASS][29] -> [SKIP][30] ([fdo#109441]) +1 similar issue
   [29]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6973/shard-iclb2/igt@kms_psr@psr2_cursor_mmap_cpu.html
   [30]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14578/shard-iclb5/igt@kms_psr@psr2_cursor_mmap_cpu.html

  * igt@kms_setmode@basic:
    - shard-skl:          [PASS][31] -> [FAIL][32] ([fdo#99912])
   [31]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6973/shard-skl2/igt@kms_setmode@basic.html
   [32]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14578/shard-skl10/igt@kms_setmode@basic.html

  
#### Possible fixes ####

  * igt@gem_exec_schedule@preempt-contexts-bsd2:
    - shard-iclb:         [SKIP][33] ([fdo#109276]) -> [PASS][34] +10 similar issues
   [33]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6973/shard-iclb7/igt@gem_exec_schedule@preempt-contexts-bsd2.html
   [34]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14578/shard-iclb4/igt@gem_exec_schedule@preempt-contexts-bsd2.html

  * igt@gem_exec_schedule@preempt-other-chain-bsd:
    - shard-iclb:         [SKIP][35] ([fdo#111325]) -> [PASS][36] +6 similar issues
   [35]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6973/shard-iclb4/igt@gem_exec_schedule@preempt-other-chain-bsd.html
   [36]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14578/shard-iclb8/igt@gem_exec_schedule@preempt-other-chain-bsd.html

  * igt@i915_suspend@sysfs-reader:
    - shard-apl:          [DMESG-WARN][37] ([fdo#108566]) -> [PASS][38] +2 similar issues
   [37]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6973/shard-apl4/igt@i915_suspend@sysfs-reader.html
   [38]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14578/shard-apl1/igt@i915_suspend@sysfs-reader.html

  * igt@kms_cursor_legacy@all-pipes-torture-move:
    - shard-kbl:          [DMESG-WARN][39] ([fdo#107122]) -> [PASS][40]
   [39]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6973/shard-kbl3/igt@kms_cursor_legacy@all-pipes-torture-move.html
   [40]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14578/shard-kbl2/igt@kms_cursor_legacy@all-pipes-torture-move.html

  * igt@kms_cursor_legacy@flip-vs-cursor-atomic:
    - shard-skl:          [FAIL][41] ([fdo#102670]) -> [PASS][42]
   [41]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6973/shard-skl3/igt@kms_cursor_legacy@flip-vs-cursor-atomic.html
   [42]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14578/shard-skl7/igt@kms_cursor_legacy@flip-vs-cursor-atomic.html

  * igt@kms_flip@flip-vs-expired-vblank:
    - shard-skl:          [FAIL][43] ([fdo#105363]) -> [PASS][44]
   [43]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6973/shard-skl5/igt@kms_flip@flip-vs-expired-vblank.html
   [44]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14578/shard-skl2/igt@kms_flip@flip-vs-expired-vblank.html

  * igt@kms_frontbuffer_tracking@fbc-rgb565-draw-pwrite:
    - shard-iclb:         [FAIL][45] ([fdo#103167]) -> [PASS][46] +3 similar issues
   [45]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6973/shard-iclb2/igt@kms_frontbuffer_tracking@fbc-rgb565-draw-pwrite.html
   [46]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14578/shard-iclb1/igt@kms_frontbuffer_tracking@fbc-rgb565-draw-pwrite.html

  * igt@kms_psr@psr2_primary_mmap_cpu:
    - shard-iclb:         [SKIP][47] ([fdo#109441]) -> [PASS][48] +1 similar issue
   [47]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6973/shard-iclb1/igt@kms_psr@psr2_primary_mmap_cpu.html
   [48]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14578/shard-iclb2/igt@kms_psr@psr2_primary_mmap_cpu.html

  * igt@kms_vblank@pipe-c-query-idle-hang:
    - shard-apl:          [INCOMPLETE][49] ([fdo#103927]) -> [PASS][50] +1 similar issue
   [49]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6973/shard-apl8/igt@kms_vblank@pipe-c-query-idle-hang.html
   [50]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14578/shard-apl8/igt@kms_vblank@pipe-c-query-idle-hang.html

  * igt@kms_vblank@pipe-c-ts-continuation-suspend:
    - shard-iclb:         [DMESG-WARN][51] ([fdo#111764]) -> [PASS][52]
   [51]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6973/shard-iclb1/igt@kms_vblank@pipe-c-ts-continuation-suspend.html
   [52]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14578/shard-iclb2/igt@kms_vblank@pipe-c-ts-continuation-suspend.html

  * igt@perf@blocking:
    - shard-skl:          [FAIL][53] ([fdo#110728]) -> [PASS][54]
   [53]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6973/shard-skl6/igt@perf@blocking.html
   [54]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14578/shard-skl1/igt@perf@blocking.html

  
#### Warnings ####

  * igt@gem_mocs_settings@mocs-isolation-bsd2:
    - shard-iclb:         [SKIP][55] ([fdo#109276]) -> [FAIL][56] ([fdo#111330])
   [55]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6973/shard-iclb7/igt@gem_mocs_settings@mocs-isolation-bsd2.html
   [56]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14578/shard-iclb4/igt@gem_mocs_settings@mocs-isolation-bsd2.html

  
  {name}: This element is suppressed. This means it is ignored when computing
          the status of the difference (SUCCESS, WARNING, or FAILURE).

  [fdo#102365]: https://bugs.freedesktop.org/show_bug.cgi?id=102365
  [fdo#102670]: https://bugs.freedesktop.org/show_bug.cgi?id=102670
  [fdo#103167]: https://bugs.freedesktop.org/show_bug.cgi?id=103167
  [fdo#103927]: https://bugs.freedesktop.org/show_bug.cgi?id=103927
  [fdo#105363]: https://bugs.freedesktop.org/show_bug.cgi?id=105363
  [fdo#105411]: https://bugs.freedesktop.org/show_bug.cgi?id=105411
  [fdo#107122]: https://bugs.freedesktop.org/show_bug.cgi?id=107122
  [fdo#107713]: https://bugs.freedesktop.org/show_bug.cgi?id=107713
  [fdo#108566]: https://bugs.freedesktop.org/show_bug.cgi?id=108566
  [fdo#109276]: https://bugs.freedesktop.org/show_bug.cgi?id=109276
  [fdo#109441]: https://bugs.freedesktop.org/show_bug.cgi?id=109441
  [fdo#109507]: https://bugs.freedesktop.org/show_bug.cgi?id=109507
  [fdo#110728]: https://bugs.freedesktop.org/show_bug.cgi?id=110728
  [fdo#111325]: https://bugs.freedesktop.org/show_bug.cgi?id=111325
  [fdo#111330]: https://bugs.freedesktop.org/show_bug.cgi?id=111330
  [fdo#111764]: https://bugs.freedesktop.org/show_bug.cgi?id=111764
  [fdo#111781]: https://bugs.freedesktop.org/show_bug.cgi?id=111781
  [fdo#99912]: https://bugs.freedesktop.org/show_bug.cgi?id=99912


Participating hosts (16 -> 10)
------------------------------

  Missing    (6): shard-tglb1 shard-tglb2 shard-tglb3 shard-tglb4 shard-tglb5 shard-tglb6 


Build changes
-------------

  * CI: CI-20190529 -> None
  * Linux: CI_DRM_6973 -> Patchwork_14578

  CI-20190529: 20190529
  CI_DRM_6973: 7462c58bba0fb6e85bd380591c3fd86e298c0f95 @ git://anongit.freedesktop.org/gfx-ci/linux
  IGT_5206: 5a6c68568def840cd720f18fc66f529a89f84675 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
  Patchwork_14578: da284ec35d7a48484badcefd78c6432f6d8d6982 @ git://anongit.freedesktop.org/gfx-ci/linux
  piglit_4509: fdc5a4ca11124ab8413c7988896eec4c97336694 @ git://anongit.freedesktop.org/piglit

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14578/
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH] drm/i915/userptr: Never allow userptr into the mappable GGTT
  2019-09-27 16:34 [PATCH] drm/i915/userptr: Never allow userptr into the mappable GGTT Chris Wilson
                   ` (6 preceding siblings ...)
  2019-09-28 19:13 ` ✗ Fi.CI.IGT: failure " Patchwork
@ 2019-09-28 20:03 ` Sasha Levin
  2019-10-01  9:39 ` ✗ Fi.CI.CHECKPATCH: warning for drm/i915/userptr: Never allow userptr into the mappable GGTT (rev3) Patchwork
                   ` (2 subsequent siblings)
  10 siblings, 0 replies; 14+ messages in thread
From: Sasha Levin @ 2019-09-28 20:03 UTC (permalink / raw)
  To: Sasha Levin, Chris Wilson, intel-gfx; +Cc: Daniel Vetter, stable

Hi,

[This is an automated email]

This commit has been processed because it contains a -stable tag.
The stable tag indicates that it's relevant for the following trees: all

The bot has tested the following trees: v5.3.1, v5.2.17, v4.19.75, v4.14.146, v4.9.194, v4.4.194.

v5.3.1: Build OK!
v5.2.17: Failed to apply! Possible dependencies:
    09407579abf5 ("drm/i915: Store the default sseu setup on the engine")
    112ed2d31a46 ("drm/i915: Move GraphicsTechnology files under gt/")
    5e5d2e209e08 ("drm/i915: Split GEM object type definition to its own header")

v4.19.75: Failed to apply! Possible dependencies:
    41b4deeaa123 ("RDMA/umem: Make ib_umem_odp into a sub structure of ib_umem")
    484d9a844d0d ("drm/i915/userptr: Avoid struct_mutex recursion for mmu_invalidate_range_start")
    597ecc5a0954 ("RDMA/umem: Get rid of struct ib_umem.odp_data")
    5d6527a784f7 ("mm/mmu_notifier: use structure for invalidate_range_start/end callback")
    b5231b019d76 ("RDMA/umem: Use ib_umem_odp in all function signatures connected to ODP")
    c9990ab39b6e ("RDMA/umem: Move all the ODP related stuff out of ucontext and into per_mm")
    d4b4dd1b9706 ("RDMA/umem: Do not use current->tgid to track the mm_struct")

v4.14.146: Failed to apply! Possible dependencies:
    17533bf95719 ("drm/i915: Rename lvds_use_ssc modparam to panel_use_ssc")
    3dcf4f207e8e ("drm/i915: Extend private i915_param_named macro with description")
    484d9a844d0d ("drm/i915/userptr: Avoid struct_mutex recursion for mmu_invalidate_range_start")
    4f044a88a86a ("drm/i915: Rename global i915 to i915_modparams")
    5602452e4c99 ("drm/i915: Use __sg_alloc_table_from_pages for userptr allocations")
    6d2cb5aa383b ("drm/i915/execlists: Read the context-status buffer from the HWSP")
    88c880bbdebe ("drm/i915: Lift has-pinned-pages assert to caller of ____i915_gem_object_get_pages")
    a5c08166265a ("drm/i915: introduce page_size members")
    acd1c1e621fc ("drm/i915: Refactor unsettting obj->mm.pages")
    c95469324518 ("drm/i915: Introduce custom variant of module_param_named macro")
    f1fa4f442c82 ("drm/i915: Refactor testing obj->mm.pages")

v4.9.194: Failed to apply! Possible dependencies:
    03ac84f1830e ("drm/i915: Pass around sg_table to get_pages/put_pages backend")
    0e70447605f4 ("drm/i915: Move common code out of i915_gpu_error.c")
    1b36595ffb35 ("drm/i915: Show RING registers through debugfs")
    275f039db56f ("drm/i915: Move user fault tracking to a separate list")
    3594a3e21f1f ("drm/i915: Remove superfluous locking around userfault_list")
    3b3f1650b1ca ("drm/i915: Allocate intel_engine_cs structure only for the enabled engines")
    484d9a844d0d ("drm/i915/userptr: Avoid struct_mutex recursion for mmu_invalidate_range_start")
    548625ee8fde ("drm/i915: Improve lockdep tracking for obj->mm.lock")
    7c108fd8feac ("drm/i915: Move fence cancellation to runtime suspend")
    8baa1f04b9ed ("drm/i915: Update debugfs describe_obj() to show fault-mappable")
    96d776345277 ("drm/i915: Use a radixtree for random access to the object's backing storage")
    9c870d03674f ("drm/i915: Use RPM as the barrier for controlling user mmap access")
    a4f5ea64f0a8 ("drm/i915: Refactor object page API")
    d636951ec01b ("drm/i915: Cleanup instdone collection")
    f8a7fde45610 ("drm/i915: Defer active reference until required")

v4.4.194: Failed to apply! Possible dependencies:
    033908aed5a5 ("drm/i915: mark GEM object pages dirty when mapped & written by the CPU")
    03ac84f1830e ("drm/i915: Pass around sg_table to get_pages/put_pages backend")
    09cbfeaf1a5a ("mm, fs: get rid of PAGE_CACHE_* and page_cache_{get,release} macros")
    0e749e54244e ("dax: increase granularity of dax_clear_blocks() operations")
    4420cfd3f51c ("staging: lustre: format properly all comment blocks for LNet core")
    484d9a844d0d ("drm/i915/userptr: Avoid struct_mutex recursion for mmu_invalidate_range_start")
    4c3523623dc0 ("net: add driver for Netronome NFP4000/NFP6000 NIC VFs")
    52db400fcd50 ("pmem, dax: clean up clear_pmem()")
    548625ee8fde ("drm/i915: Improve lockdep tracking for obj->mm.lock")
    5fd88337d209 ("staging: lustre: fix all conditional comparison to zero in LNet layer")
    85d1225ec066 ("drm/i915: Introduce & use new lightweight SGL iterators")
    a188222b6ed2 ("net: Rename NETIF_F_ALL_CSUM to NETIF_F_CSUM_MASK")
    b2e0d1625e19 ("dax: fix lifetime of in-kernel dax mappings with dax_map_atomic()")
    b9bcd14a2b91 ("drm/i915: Extract checking for backing struct pages to a helper")
    d1a5f2b4d8a1 ("block: use DAX for partition table reads")
    de4726649b6b ("drm/i915: Allow i915_gem_object_get_page() on userptr as well")
    e10624f8c097 ("pmem: fail io-requests to known bad blocks")


NOTE: The patch will not be queued to stable trees until it is upstream.

How should we proceed with this patch?

--
Thanks,
Sasha
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [Intel-gfx] [PATCH v2] drm/i915/userptr: Never allow userptr into the mappable GGTT
  2019-09-28  8:25 ` [PATCH v2] " Chris Wilson
@ 2019-09-30 10:33   ` Tvrtko Ursulin
  2019-09-30 11:17     ` Chris Wilson
  0 siblings, 1 reply; 14+ messages in thread
From: Tvrtko Ursulin @ 2019-09-30 10:33 UTC (permalink / raw)
  To: Chris Wilson, intel-gfx; +Cc: Daniel Vetter, stable


On 28/09/2019 09:25, Chris Wilson wrote:
> Daniel Vetter uncovered a nasty cycle in using the mmu-notifiers to
> invalidate userptr objects which also happen to be pulled into GGTT
> mmaps. That is when we unbind the userptr object (on mmu invalidation),
> we revoke all CPU mmaps, which may then recurse into mmu invalidation.

On the same object? Invalidate on userptr built from some mmap_gtt area, 
or standard userptr object mmapped via gtt? Or one userptr object built 
from a mmap_gtt of another userptr object?

Will anything change here after the struct mutex removal series? AFAIR 
you remove struct mutex from userptr invalidation there.

> We looked for ways of breaking the cycle, but the revocation on
> invalidation is required and cannot be avoided. The only solution we
> could see was to not allow such GGTT bindings of userptr objects in the
> first place. In practice, no one really wants to use a GGTT mmapping of
> a CPU pointer...
> 
> Just before Daniel's explosive lockdep patches land in rc1, we got a
> genuine blip from CI:
> 
> <4>[  246.793958] ======================================================
> <4>[  246.793972] WARNING: possible circular locking dependency detected
> <4>[  246.793989] 5.3.0-gbd6c56f50d15-drmtip_372+ #1 Tainted: G     U
> <4>[  246.794003] ------------------------------------------------------
> <4>[  246.794017] kswapd0/145 is trying to acquire lock:
> <4>[  246.794030] 000000003f565be6 (&dev->struct_mutex/1){+.+.}, at: userptr_mn_invalidate_range_start+0x18f/0x220 [i915]
> <4>[  246.794250]
>                    but task is already holding lock:
> <4>[  246.794263] 000000001799cef9 (&anon_vma->rwsem){++++}, at: page_lock_anon_vma_read+0xe6/0x2a0
> <4>[  246.794291]
>                    which lock already depends on the new lock.
> 
> <4>[  246.794307]
>                    the existing dependency chain (in reverse order) is:
> <4>[  246.794322]
>                    -> #3 (&anon_vma->rwsem){++++}:
> <4>[  246.794344]        down_write+0x33/0x70
> <4>[  246.794357]        __vma_adjust+0x3d9/0x7b0
> <4>[  246.794370]        __split_vma+0x16a/0x180
> <4>[  246.794385]        mprotect_fixup+0x2a5/0x320
> <4>[  246.794399]        do_mprotect_pkey+0x208/0x2e0
> <4>[  246.794413]        __x64_sys_mprotect+0x16/0x20
> <4>[  246.794429]        do_syscall_64+0x55/0x1c0
> <4>[  246.794443]        entry_SYSCALL_64_after_hwframe+0x49/0xbe
> <4>[  246.794456]
>                    -> #2 (&mapping->i_mmap_rwsem){++++}:
> <4>[  246.794478]        down_write+0x33/0x70
> <4>[  246.794493]        unmap_mapping_pages+0x48/0x130
> <4>[  246.794519]        i915_vma_revoke_mmap+0x81/0x1b0 [i915]
> <4>[  246.794519]        i915_vma_unbind+0x11d/0x4a0 [i915]
> <4>[  246.794519]        i915_vma_destroy+0x31/0x300 [i915]
> <4>[  246.794519]        __i915_gem_free_objects+0xb8/0x4b0 [i915]
> <4>[  246.794519]        drm_file_free.part.0+0x1e6/0x290
> <4>[  246.794519]        drm_release+0xa6/0xe0
> <4>[  246.794519]        __fput+0xc2/0x250
> <4>[  246.794519]        task_work_run+0x82/0xb0
> <4>[  246.794519]        do_exit+0x35b/0xdb0
> <4>[  246.794519]        do_group_exit+0x34/0xb0
> <4>[  246.794519]        __x64_sys_exit_group+0xf/0x10
> <4>[  246.794519]        do_syscall_64+0x55/0x1c0
> <4>[  246.794519]        entry_SYSCALL_64_after_hwframe+0x49/0xbe
> <4>[  246.794519]
>                    -> #1 (&vm->mutex){+.+.}:
> <4>[  246.794519]        i915_gem_shrinker_taints_mutex+0x6d/0xe0 [i915]
> <4>[  246.794519]        i915_address_space_init+0x9f/0x160 [i915]
> <4>[  246.794519]        i915_ggtt_init_hw+0x55/0x170 [i915]
> <4>[  246.794519]        i915_driver_probe+0xc9f/0x1620 [i915]
> <4>[  246.794519]        i915_pci_probe+0x43/0x1b0 [i915]
> <4>[  246.794519]        pci_device_probe+0x9e/0x120
> <4>[  246.794519]        really_probe+0xea/0x3d0
> <4>[  246.794519]        driver_probe_device+0x10b/0x120
> <4>[  246.794519]        device_driver_attach+0x4a/0x50
> <4>[  246.794519]        __driver_attach+0x97/0x130
> <4>[  246.794519]        bus_for_each_dev+0x74/0xc0
> <4>[  246.794519]        bus_add_driver+0x13f/0x210
> <4>[  246.794519]        driver_register+0x56/0xe0
> <4>[  246.794519]        do_one_initcall+0x58/0x300
> <4>[  246.794519]        do_init_module+0x56/0x1f6
> <4>[  246.794519]        load_module+0x25bd/0x2a40
> <4>[  246.794519]        __se_sys_finit_module+0xd3/0xf0
> <4>[  246.794519]        do_syscall_64+0x55/0x1c0
> <4>[  246.794519]        entry_SYSCALL_64_after_hwframe+0x49/0xbe
> <4>[  246.794519]
>                    -> #0 (&dev->struct_mutex/1){+.+.}:
> <4>[  246.794519]        __lock_acquire+0x15d8/0x1e90
> <4>[  246.794519]        lock_acquire+0xa6/0x1c0
> <4>[  246.794519]        __mutex_lock+0x9d/0x9b0
> <4>[  246.794519]        userptr_mn_invalidate_range_start+0x18f/0x220 [i915]
> <4>[  246.794519]        __mmu_notifier_invalidate_range_start+0x85/0x110
> <4>[  246.794519]        try_to_unmap_one+0x76b/0x860
> <4>[  246.794519]        rmap_walk_anon+0x104/0x280
> <4>[  246.794519]        try_to_unmap+0xc0/0xf0
> <4>[  246.794519]        shrink_page_list+0x561/0xc10
> <4>[  246.794519]        shrink_inactive_list+0x220/0x440
> <4>[  246.794519]        shrink_node_memcg+0x36e/0x740
> <4>[  246.794519]        shrink_node+0xcb/0x490
> <4>[  246.794519]        balance_pgdat+0x241/0x580
> <4>[  246.794519]        kswapd+0x16c/0x530
> <4>[  246.794519]        kthread+0x119/0x130
> <4>[  246.794519]        ret_from_fork+0x24/0x50
> <4>[  246.794519]
>                    other info that might help us debug this:
> 
> <4>[  246.794519] Chain exists of:
>                      &dev->struct_mutex/1 --> &mapping->i_mmap_rwsem --> &anon_vma->rwsem
> 
> <4>[  246.794519]  Possible unsafe locking scenario:
> 
> <4>[  246.794519]        CPU0                    CPU1
> <4>[  246.794519]        ----                    ----
> <4>[  246.794519]   lock(&anon_vma->rwsem);
> <4>[  246.794519]                                lock(&mapping->i_mmap_rwsem);
> <4>[  246.794519]                                lock(&anon_vma->rwsem);
> <4>[  246.794519]   lock(&dev->struct_mutex/1);
> <4>[  246.794519]
>                     *** DEADLOCK ***
> 
> v2: Say no to mmap_ioctl
> 
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=111744
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
> Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
> Cc: stable@vger.kernel.org
> ---
>   drivers/gpu/drm/i915/gem/i915_gem_mman.c         | 7 +++++++
>   drivers/gpu/drm/i915/gem/i915_gem_object.h       | 6 ++++++
>   drivers/gpu/drm/i915/gem/i915_gem_object_types.h | 3 ++-
>   drivers/gpu/drm/i915/gem/i915_gem_userptr.c      | 1 +
>   drivers/gpu/drm/i915/i915_gem.c                  | 3 +++
>   5 files changed, 19 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/i915/gem/i915_gem_mman.c b/drivers/gpu/drm/i915/gem/i915_gem_mman.c
> index 860b751c51f1..dd0c2840ba4d 100644
> --- a/drivers/gpu/drm/i915/gem/i915_gem_mman.c
> +++ b/drivers/gpu/drm/i915/gem/i915_gem_mman.c
> @@ -343,6 +343,7 @@ vm_fault_t i915_gem_fault(struct vm_fault *vmf)
>   		/* fallthrough */
>   	case -EIO: /* shmemfs failure from swap device */
>   	case -EFAULT: /* purged object */
> +	case -ENODEV: /* bad object, how did you get here! */
>   		return VM_FAULT_SIGBUS;
>   
>   	case -ENOSPC: /* shmemfs allocation failure */
> @@ -466,10 +467,16 @@ i915_gem_mmap_gtt(struct drm_file *file,
>   	if (!obj)
>   		return -ENOENT;
>   
> +	if (i915_gem_object_never_bind_ggtt(obj)) {
> +		ret = -ENODEV;
> +		goto out;
> +	}
> +
>   	ret = create_mmap_offset(obj);
>   	if (ret == 0)
>   		*offset = drm_vma_node_offset_addr(&obj->base.vma_node);
>   
> +out:
>   	i915_gem_object_put(obj);
>   	return ret;
>   }
> diff --git a/drivers/gpu/drm/i915/gem/i915_gem_object.h b/drivers/gpu/drm/i915/gem/i915_gem_object.h
> index 29b9eddc4c7f..aec05f967d9d 100644
> --- a/drivers/gpu/drm/i915/gem/i915_gem_object.h
> +++ b/drivers/gpu/drm/i915/gem/i915_gem_object.h
> @@ -152,6 +152,12 @@ i915_gem_object_is_proxy(const struct drm_i915_gem_object *obj)
>   	return obj->ops->flags & I915_GEM_OBJECT_IS_PROXY;
>   }
>   
> +static inline bool
> +i915_gem_object_never_bind_ggtt(const struct drm_i915_gem_object *obj)
> +{
> +	return obj->ops->flags & I915_GEM_OBJECT_NO_GGTT;
> +}
> +
>   static inline bool
>   i915_gem_object_needs_async_cancel(const struct drm_i915_gem_object *obj)
>   {
> diff --git a/drivers/gpu/drm/i915/gem/i915_gem_object_types.h b/drivers/gpu/drm/i915/gem/i915_gem_object_types.h
> index d695f187b790..e1aab2fd1cd9 100644
> --- a/drivers/gpu/drm/i915/gem/i915_gem_object_types.h
> +++ b/drivers/gpu/drm/i915/gem/i915_gem_object_types.h
> @@ -32,7 +32,8 @@ struct drm_i915_gem_object_ops {
>   #define I915_GEM_OBJECT_HAS_STRUCT_PAGE	BIT(0)
>   #define I915_GEM_OBJECT_IS_SHRINKABLE	BIT(1)
>   #define I915_GEM_OBJECT_IS_PROXY	BIT(2)
> -#define I915_GEM_OBJECT_ASYNC_CANCEL	BIT(3)
> +#define I915_GEM_OBJECT_NO_GGTT		BIT(3)
> +#define I915_GEM_OBJECT_ASYNC_CANCEL	BIT(4)
>   
>   	/* Interface between the GEM object and its backing storage.
>   	 * get_pages() is called once prior to the use of the associated set
> diff --git a/drivers/gpu/drm/i915/gem/i915_gem_userptr.c b/drivers/gpu/drm/i915/gem/i915_gem_userptr.c
> index 11b231c187c5..6b3b50f0f6d9 100644
> --- a/drivers/gpu/drm/i915/gem/i915_gem_userptr.c
> +++ b/drivers/gpu/drm/i915/gem/i915_gem_userptr.c
> @@ -702,6 +702,7 @@ i915_gem_userptr_dmabuf_export(struct drm_i915_gem_object *obj)
>   static const struct drm_i915_gem_object_ops i915_gem_userptr_ops = {
>   	.flags = I915_GEM_OBJECT_HAS_STRUCT_PAGE |
>   		 I915_GEM_OBJECT_IS_SHRINKABLE |
> +		 I915_GEM_OBJECT_NO_GGTT |
>   		 I915_GEM_OBJECT_ASYNC_CANCEL,
>   	.get_pages = i915_gem_userptr_get_pages,
>   	.put_pages = i915_gem_userptr_put_pages,
> diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
> index 3d3fda4cae99..1426e506700d 100644
> --- a/drivers/gpu/drm/i915/i915_gem.c
> +++ b/drivers/gpu/drm/i915/i915_gem.c
> @@ -970,6 +970,9 @@ i915_gem_object_ggtt_pin(struct drm_i915_gem_object *obj,
>   
>   	lockdep_assert_held(&obj->base.dev->struct_mutex);
>   
> +	if (i915_gem_object_never_bind_ggtt(obj))
> +		return ERR_PTR(-ENODEV);
> +
>   	if (flags & PIN_MAPPABLE &&
>   	    (!view || view->type == I915_GGTT_VIEW_NORMAL)) {
>   		/* If the required space is larger than the available
> 

I remember in the distant past we discussed whether or not to allow 
this. It is indeed a quite perverse setup so I am okay with disallowing it.

Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>

Regards,

Tvrtko

P.S. I expect there will be some IGTs to be adjusted as well.

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [Intel-gfx] [PATCH v2] drm/i915/userptr: Never allow userptr into the mappable GGTT
  2019-09-30 10:33   ` [Intel-gfx] " Tvrtko Ursulin
@ 2019-09-30 11:17     ` Chris Wilson
  0 siblings, 0 replies; 14+ messages in thread
From: Chris Wilson @ 2019-09-30 11:17 UTC (permalink / raw)
  To: Tvrtko Ursulin, intel-gfx; +Cc: Daniel Vetter, stable

Quoting Tvrtko Ursulin (2019-09-30 11:33:22)
> 
> On 28/09/2019 09:25, Chris Wilson wrote:
> > Daniel Vetter uncovered a nasty cycle in using the mmu-notifiers to
> > invalidate userptr objects which also happen to be pulled into GGTT
> > mmaps. That is when we unbind the userptr object (on mmu invalidation),
> > we revoke all CPU mmaps, which may then recurse into mmu invalidation.
> 
> On the same object? Invalidate on userptr built from some mmap_gtt area, 
> or standard userptr object mmapped via gtt? Or one userptr object built 
> from a mmap_gtt of another userptr object?

Yup, think of the multiple partial mmaps we have on the same object. If
we invalidate the mmap_offset, we may hit the same object again in
mmu-invalidate. As far as my understanding goes, there is nothing in
the munmap/invalidate that prevents this. Although, having the same
pages mapped into different process is not unusual, so you would think
we are not alone in having device pages in multiple mappings? There
might be something more at play here, but Daniel's lockdep patch is
straightforward: no recursion allowed in mmu-invalidate.

> Will anything change here after the struct mutex removal series? AFAIR 
> you remove struct mutex from userptr invalidation there.

No. This, aiui, is purely an issue where we trigger an mmu-invalidate
from inside the mmu_invalidate_range_start.
 
[snip]

> I remember in the distant past we discussed whether or not to allow 
> this. It is indeed a quite perverse setup so I am okay with disallowing it.
> 
> Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
> 
> Regards,
> 
> Tvrtko
> 
> P.S. I expect there will be some IGTs to be adjusted as well.

Yup. This was to start the ball rolling as come rc1 we will have some
fire-fighting to do.
-Chris

^ permalink raw reply	[flat|nested] 14+ messages in thread

* ✗ Fi.CI.CHECKPATCH: warning for drm/i915/userptr: Never allow userptr into the mappable GGTT (rev3)
  2019-09-27 16:34 [PATCH] drm/i915/userptr: Never allow userptr into the mappable GGTT Chris Wilson
                   ` (7 preceding siblings ...)
  2019-09-28 20:03 ` [PATCH] drm/i915/userptr: Never allow userptr into the mappable GGTT Sasha Levin
@ 2019-10-01  9:39 ` Patchwork
  2019-10-01 10:06 ` ✓ Fi.CI.BAT: success " Patchwork
  2019-10-01 13:40 ` ✗ Fi.CI.IGT: failure " Patchwork
  10 siblings, 0 replies; 14+ messages in thread
From: Patchwork @ 2019-10-01  9:39 UTC (permalink / raw)
  To: Chris Wilson; +Cc: intel-gfx

== Series Details ==

Series: drm/i915/userptr: Never allow userptr into the mappable GGTT (rev3)
URL   : https://patchwork.freedesktop.org/series/67349/
State : warning

== Summary ==

$ dim checkpatch origin/drm-tip
d0541b40d6ed drm/i915/userptr: Never allow userptr into the mappable GGTT
-:25: WARNING:COMMIT_LOG_LONG_LINE: Possible unwrapped commit description (prefer a maximum 75 chars per line)
#25: 
<4>[  246.794030] 000000003f565be6 (&dev->struct_mutex/1){+.+.}, at: userptr_mn_invalidate_range_start+0x18f/0x220 [i915]

total: 0 errors, 1 warnings, 0 checks, 60 lines checked

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 14+ messages in thread

* ✓ Fi.CI.BAT: success for drm/i915/userptr: Never allow userptr into the mappable GGTT (rev3)
  2019-09-27 16:34 [PATCH] drm/i915/userptr: Never allow userptr into the mappable GGTT Chris Wilson
                   ` (8 preceding siblings ...)
  2019-10-01  9:39 ` ✗ Fi.CI.CHECKPATCH: warning for drm/i915/userptr: Never allow userptr into the mappable GGTT (rev3) Patchwork
@ 2019-10-01 10:06 ` Patchwork
  2019-10-01 13:40 ` ✗ Fi.CI.IGT: failure " Patchwork
  10 siblings, 0 replies; 14+ messages in thread
From: Patchwork @ 2019-10-01 10:06 UTC (permalink / raw)
  To: Chris Wilson; +Cc: intel-gfx

== Series Details ==

Series: drm/i915/userptr: Never allow userptr into the mappable GGTT (rev3)
URL   : https://patchwork.freedesktop.org/series/67349/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_6980 -> Patchwork_14601
====================================================

Summary
-------

  **SUCCESS**

  No regressions found.

  External URL: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14601/index.html

Possible new issues
-------------------

  Here are the unknown changes that may have been introduced in Patchwork_14601:

### IGT changes ###

#### Suppressed ####

  The following results come from untrusted machines, tests, or statuses.
  They do not affect the overall result.

  * igt@gem_sync@basic-many-each:
    - {fi-cml-h}:         NOTRUN -> [TIMEOUT][1]
   [1]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14601/fi-cml-h/igt@gem_sync@basic-many-each.html

  * igt@runner@aborted:
    - {fi-cml-h}:         NOTRUN -> [FAIL][2]
   [2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14601/fi-cml-h/igt@runner@aborted.html

  
Known issues
------------

  Here are the changes found in Patchwork_14601 that come from known issues:

### IGT changes ###

#### Issues hit ####

  * igt@gem_ctx_switch@legacy-render:
    - fi-icl-u2:          [PASS][3] -> [INCOMPLETE][4] ([fdo#107713] / [fdo#111381])
   [3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6980/fi-icl-u2/igt@gem_ctx_switch@legacy-render.html
   [4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14601/fi-icl-u2/igt@gem_ctx_switch@legacy-render.html

  * igt@kms_addfb_basic@addfb25-yf-tiled:
    - fi-icl-u3:          [PASS][5] -> [DMESG-WARN][6] ([fdo#107724])
   [5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6980/fi-icl-u3/igt@kms_addfb_basic@addfb25-yf-tiled.html
   [6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14601/fi-icl-u3/igt@kms_addfb_basic@addfb25-yf-tiled.html

  * igt@kms_flip@basic-flip-vs-modeset:
    - fi-hsw-4770r:       [PASS][7] -> [DMESG-WARN][8] ([fdo#105602])
   [7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6980/fi-hsw-4770r/igt@kms_flip@basic-flip-vs-modeset.html
   [8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14601/fi-hsw-4770r/igt@kms_flip@basic-flip-vs-modeset.html

  * igt@kms_frontbuffer_tracking@basic:
    - fi-icl-u3:          [PASS][9] -> [FAIL][10] ([fdo#103167])
   [9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6980/fi-icl-u3/igt@kms_frontbuffer_tracking@basic.html
   [10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14601/fi-icl-u3/igt@kms_frontbuffer_tracking@basic.html

  
#### Possible fixes ####

  * igt@gem_exec_fence@nb-await-default:
    - fi-icl-u3:          [DMESG-WARN][11] ([fdo#107724]) -> [PASS][12] +3 similar issues
   [11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6980/fi-icl-u3/igt@gem_exec_fence@nb-await-default.html
   [12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14601/fi-icl-u3/igt@gem_exec_fence@nb-await-default.html

  * igt@gem_sync@basic-each:
    - {fi-tgl-u2}:        [INCOMPLETE][13] ([fdo#111647]) -> [PASS][14]
   [13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6980/fi-tgl-u2/igt@gem_sync@basic-each.html
   [14]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14601/fi-tgl-u2/igt@gem_sync@basic-each.html

  * igt@kms_frontbuffer_tracking@basic:
    - {fi-icl-u4}:        [FAIL][15] ([fdo#103167]) -> [PASS][16]
   [15]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6980/fi-icl-u4/igt@kms_frontbuffer_tracking@basic.html
   [16]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14601/fi-icl-u4/igt@kms_frontbuffer_tracking@basic.html
    - fi-hsw-peppy:       [DMESG-WARN][17] ([fdo#102614]) -> [PASS][18]
   [17]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6980/fi-hsw-peppy/igt@kms_frontbuffer_tracking@basic.html
   [18]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14601/fi-hsw-peppy/igt@kms_frontbuffer_tracking@basic.html

  
#### Warnings ####

  * igt@i915_module_load@reload:
    - fi-icl-u3:          [DMESG-WARN][19] ([fdo#106107] / [fdo#107724] / [fdo#111214]) -> [DMESG-WARN][20] ([fdo#107724] / [fdo#111214])
   [19]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6980/fi-icl-u3/igt@i915_module_load@reload.html
   [20]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14601/fi-icl-u3/igt@i915_module_load@reload.html

  
  {name}: This element is suppressed. This means it is ignored when computing
          the status of the difference (SUCCESS, WARNING, or FAILURE).

  [fdo#102614]: https://bugs.freedesktop.org/show_bug.cgi?id=102614
  [fdo#103167]: https://bugs.freedesktop.org/show_bug.cgi?id=103167
  [fdo#105602]: https://bugs.freedesktop.org/show_bug.cgi?id=105602
  [fdo#106107]: https://bugs.freedesktop.org/show_bug.cgi?id=106107
  [fdo#107713]: https://bugs.freedesktop.org/show_bug.cgi?id=107713
  [fdo#107724]: https://bugs.freedesktop.org/show_bug.cgi?id=107724
  [fdo#111214]: https://bugs.freedesktop.org/show_bug.cgi?id=111214
  [fdo#111381]: https://bugs.freedesktop.org/show_bug.cgi?id=111381
  [fdo#111600]: https://bugs.freedesktop.org/show_bug.cgi?id=111600
  [fdo#111647]: https://bugs.freedesktop.org/show_bug.cgi?id=111647


Participating hosts (50 -> 44)
------------------------------

  Additional (3): fi-byt-j1900 fi-cml-h fi-snb-2600 
  Missing    (9): fi-ilk-m540 fi-bxt-dsi fi-hsw-4200u fi-byt-squawks fi-bsw-cyan fi-kbl-7500u fi-icl-y fi-byt-clapper fi-bdw-samus 


Build changes
-------------

  * CI: CI-20190529 -> None
  * Linux: CI_DRM_6980 -> Patchwork_14601

  CI-20190529: 20190529
  CI_DRM_6980: 46637a3b58ef5e2c0fb6e53b7c50bba8f5de3455 @ git://anongit.freedesktop.org/gfx-ci/linux
  IGT_5208: c0131b4f132acf287d9d05b0f5078003d3159e1c @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
  Patchwork_14601: d0541b40d6ed7753be10a3d766ddc97321e3f38f @ git://anongit.freedesktop.org/gfx-ci/linux


== Linux commits ==

d0541b40d6ed drm/i915/userptr: Never allow userptr into the mappable GGTT

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14601/index.html
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 14+ messages in thread

* ✗ Fi.CI.IGT: failure for drm/i915/userptr: Never allow userptr into the mappable GGTT (rev3)
  2019-09-27 16:34 [PATCH] drm/i915/userptr: Never allow userptr into the mappable GGTT Chris Wilson
                   ` (9 preceding siblings ...)
  2019-10-01 10:06 ` ✓ Fi.CI.BAT: success " Patchwork
@ 2019-10-01 13:40 ` Patchwork
  10 siblings, 0 replies; 14+ messages in thread
From: Patchwork @ 2019-10-01 13:40 UTC (permalink / raw)
  To: Chris Wilson; +Cc: intel-gfx

== Series Details ==

Series: drm/i915/userptr: Never allow userptr into the mappable GGTT (rev3)
URL   : https://patchwork.freedesktop.org/series/67349/
State : failure

== Summary ==

CI Bug Log - changes from CI_DRM_6980_full -> Patchwork_14601_full
====================================================

Summary
-------

  **FAILURE**

  Serious unknown changes coming with Patchwork_14601_full absolutely need to be
  verified manually.
  
  If you think the reported changes have nothing to do with the changes
  introduced in Patchwork_14601_full, please notify your bug team to allow them
  to document this new failure mode, which will reduce false positives in CI.

  

Possible new issues
-------------------

  Here are the unknown changes that may have been introduced in Patchwork_14601_full:

### IGT changes ###

#### Possible regressions ####

  * igt@gem_tiled_blits@normal:
    - shard-kbl:          [PASS][1] -> [DMESG-WARN][2]
   [1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6980/shard-kbl7/igt@gem_tiled_blits@normal.html
   [2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14601/shard-kbl4/igt@gem_tiled_blits@normal.html

  * igt@gem_userptr_blits@dmabuf-sync:
    - shard-kbl:          [PASS][3] -> [FAIL][4] +1 similar issue
   [3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6980/shard-kbl3/igt@gem_userptr_blits@dmabuf-sync.html
   [4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14601/shard-kbl1/igt@gem_userptr_blits@dmabuf-sync.html

  * igt@gem_userptr_blits@dmabuf-unsync:
    - shard-hsw:          [PASS][5] -> [FAIL][6]
   [5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6980/shard-hsw7/igt@gem_userptr_blits@dmabuf-unsync.html
   [6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14601/shard-hsw8/igt@gem_userptr_blits@dmabuf-unsync.html
    - shard-snb:          [PASS][7] -> [FAIL][8]
   [7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6980/shard-snb1/igt@gem_userptr_blits@dmabuf-unsync.html
   [8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14601/shard-snb1/igt@gem_userptr_blits@dmabuf-unsync.html

  * igt@gem_userptr_blits@readonly-mmap-unsync:
    - shard-apl:          [PASS][9] -> [FAIL][10]
   [9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6980/shard-apl8/igt@gem_userptr_blits@readonly-mmap-unsync.html
   [10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14601/shard-apl7/igt@gem_userptr_blits@readonly-mmap-unsync.html
    - shard-glk:          [PASS][11] -> [FAIL][12]
   [11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6980/shard-glk4/igt@gem_userptr_blits@readonly-mmap-unsync.html
   [12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14601/shard-glk6/igt@gem_userptr_blits@readonly-mmap-unsync.html

  
#### Warnings ####

  * igt@gem_userptr_blits@dmabuf-sync:
    - shard-snb:          [DMESG-WARN][13] ([fdo#111870]) -> [FAIL][14]
   [13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6980/shard-snb2/igt@gem_userptr_blits@dmabuf-sync.html
   [14]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14601/shard-snb2/igt@gem_userptr_blits@dmabuf-sync.html
    - shard-iclb:         [DMESG-WARN][15] ([fdo#111870]) -> [FAIL][16] +1 similar issue
   [15]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6980/shard-iclb1/igt@gem_userptr_blits@dmabuf-sync.html
   [16]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14601/shard-iclb2/igt@gem_userptr_blits@dmabuf-sync.html
    - shard-hsw:          [DMESG-WARN][17] ([fdo#111870]) -> [FAIL][18]
   [17]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6980/shard-hsw1/igt@gem_userptr_blits@dmabuf-sync.html
   [18]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14601/shard-hsw4/igt@gem_userptr_blits@dmabuf-sync.html

  * igt@gem_userptr_blits@dmabuf-unsync:
    - shard-skl:          [DMESG-WARN][19] ([fdo#111870]) -> [FAIL][20] +1 similar issue
   [19]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6980/shard-skl2/igt@gem_userptr_blits@dmabuf-unsync.html
   [20]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14601/shard-skl7/igt@gem_userptr_blits@dmabuf-unsync.html
    - shard-kbl:          [DMESG-WARN][21] ([fdo#111870]) -> [FAIL][22]
   [21]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6980/shard-kbl3/igt@gem_userptr_blits@dmabuf-unsync.html
   [22]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14601/shard-kbl1/igt@gem_userptr_blits@dmabuf-unsync.html

  
Known issues
------------

  Here are the changes found in Patchwork_14601_full that come from known issues:

### IGT changes ###

#### Issues hit ####

  * igt@gem_eio@in-flight-contexts-immediate:
    - shard-hsw:          [PASS][23] -> [FAIL][24] ([fdo#105957])
   [23]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6980/shard-hsw8/igt@gem_eio@in-flight-contexts-immediate.html
   [24]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14601/shard-hsw7/igt@gem_eio@in-flight-contexts-immediate.html

  * igt@gem_exec_schedule@reorder-wide-bsd:
    - shard-iclb:         [PASS][25] -> [SKIP][26] ([fdo#111325]) +4 similar issues
   [25]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6980/shard-iclb3/igt@gem_exec_schedule@reorder-wide-bsd.html
   [26]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14601/shard-iclb1/igt@gem_exec_schedule@reorder-wide-bsd.html

  * igt@gem_softpin@noreloc-interruptible:
    - shard-skl:          [PASS][27] -> [TIMEOUT][28] ([fdo#111439])
   [27]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6980/shard-skl9/igt@gem_softpin@noreloc-interruptible.html
   [28]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14601/shard-skl3/igt@gem_softpin@noreloc-interruptible.html

  * igt@gem_userptr_blits@coherency-sync:
    - shard-hsw:          [PASS][29] -> [DMESG-WARN][30] ([fdo#111870]) +1 similar issue
   [29]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6980/shard-hsw4/igt@gem_userptr_blits@coherency-sync.html
   [30]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14601/shard-hsw1/igt@gem_userptr_blits@coherency-sync.html

  * igt@gem_userptr_blits@map-fixed-invalidate-overlap-busy-gup:
    - shard-apl:          [PASS][31] -> [DMESG-WARN][32] ([fdo#109385] / [fdo#111870])
   [31]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6980/shard-apl1/igt@gem_userptr_blits@map-fixed-invalidate-overlap-busy-gup.html
   [32]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14601/shard-apl1/igt@gem_userptr_blits@map-fixed-invalidate-overlap-busy-gup.html

  * igt@gem_userptr_blits@sync-unmap-after-close:
    - shard-skl:          [PASS][33] -> [DMESG-WARN][34] ([fdo#111870]) +1 similar issue
   [33]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6980/shard-skl1/igt@gem_userptr_blits@sync-unmap-after-close.html
   [34]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14601/shard-skl10/igt@gem_userptr_blits@sync-unmap-after-close.html
    - shard-glk:          [PASS][35] -> [DMESG-WARN][36] ([fdo#111870]) +1 similar issue
   [35]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6980/shard-glk1/igt@gem_userptr_blits@sync-unmap-after-close.html
   [36]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14601/shard-glk6/igt@gem_userptr_blits@sync-unmap-after-close.html
    - shard-snb:          [PASS][37] -> [DMESG-WARN][38] ([fdo#111870])
   [37]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6980/shard-snb2/igt@gem_userptr_blits@sync-unmap-after-close.html
   [38]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14601/shard-snb7/igt@gem_userptr_blits@sync-unmap-after-close.html

  * igt@gem_wait@busy-rcs0:
    - shard-skl:          [PASS][39] -> [DMESG-WARN][40] ([fdo#106107])
   [39]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6980/shard-skl9/igt@gem_wait@busy-rcs0.html
   [40]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14601/shard-skl9/igt@gem_wait@busy-rcs0.html

  * igt@i915_suspend@fence-restore-tiled2untiled:
    - shard-apl:          [PASS][41] -> [DMESG-WARN][42] ([fdo#108566]) +5 similar issues
   [41]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6980/shard-apl2/igt@i915_suspend@fence-restore-tiled2untiled.html
   [42]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14601/shard-apl8/igt@i915_suspend@fence-restore-tiled2untiled.html

  * igt@kms_cursor_crc@pipe-c-cursor-64x64-random:
    - shard-hsw:          [PASS][43] -> [INCOMPLETE][44] ([fdo#103540])
   [43]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6980/shard-hsw1/igt@kms_cursor_crc@pipe-c-cursor-64x64-random.html
   [44]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14601/shard-hsw4/igt@kms_cursor_crc@pipe-c-cursor-64x64-random.html

  * igt@kms_cursor_legacy@flip-vs-cursor-toggle:
    - shard-skl:          [PASS][45] -> [FAIL][46] ([fdo#102670] / [fdo#106081])
   [45]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6980/shard-skl2/igt@kms_cursor_legacy@flip-vs-cursor-toggle.html
   [46]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14601/shard-skl7/igt@kms_cursor_legacy@flip-vs-cursor-toggle.html

  * igt@kms_fbcon_fbt@psr:
    - shard-iclb:         [PASS][47] -> [FAIL][48] ([fdo#103833])
   [47]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6980/shard-iclb4/igt@kms_fbcon_fbt@psr.html
   [48]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14601/shard-iclb2/igt@kms_fbcon_fbt@psr.html

  * igt@kms_flip@2x-flip-vs-expired-vblank:
    - shard-hsw:          [PASS][49] -> [FAIL][50] ([fdo#102887])
   [49]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6980/shard-hsw5/igt@kms_flip@2x-flip-vs-expired-vblank.html
   [50]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14601/shard-hsw7/igt@kms_flip@2x-flip-vs-expired-vblank.html

  * igt@kms_flip@dpms-vs-vblank-race:
    - shard-glk:          [PASS][51] -> [FAIL][52] ([fdo#111609])
   [51]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6980/shard-glk6/igt@kms_flip@dpms-vs-vblank-race.html
   [52]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14601/shard-glk9/igt@kms_flip@dpms-vs-vblank-race.html

  * igt@kms_flip@flip-vs-fences:
    - shard-apl:          [PASS][53] -> [INCOMPLETE][54] ([fdo#103927]) +1 similar issue
   [53]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6980/shard-apl6/igt@kms_flip@flip-vs-fences.html
   [54]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14601/shard-apl4/igt@kms_flip@flip-vs-fences.html

  * igt@kms_frontbuffer_tracking@fbc-badstride:
    - shard-iclb:         [PASS][55] -> [FAIL][56] ([fdo#103167]) +9 similar issues
   [55]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6980/shard-iclb5/igt@kms_frontbuffer_tracking@fbc-badstride.html
   [56]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14601/shard-iclb6/igt@kms_frontbuffer_tracking@fbc-badstride.html

  * igt@kms_frontbuffer_tracking@fbcpsr-suspend:
    - shard-iclb:         [PASS][57] -> [INCOMPLETE][58] ([fdo#106978] / [fdo#107713])
   [57]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6980/shard-iclb1/igt@kms_frontbuffer_tracking@fbcpsr-suspend.html
   [58]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14601/shard-iclb7/igt@kms_frontbuffer_tracking@fbcpsr-suspend.html

  * igt@kms_frontbuffer_tracking@psr-1p-primscrn-spr-indfb-draw-mmap-cpu:
    - shard-iclb:         [PASS][59] -> [FAIL][60] ([fdo#109247]) +2 similar issues
   [59]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6980/shard-iclb4/igt@kms_frontbuffer_tracking@psr-1p-primscrn-spr-indfb-draw-mmap-cpu.html
   [60]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14601/shard-iclb2/igt@kms_frontbuffer_tracking@psr-1p-primscrn-spr-indfb-draw-mmap-cpu.html

  * igt@kms_plane@plane-panning-bottom-right-pipe-a-planes:
    - shard-skl:          [PASS][61] -> [FAIL][62] ([fdo#103166])
   [61]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6980/shard-skl10/igt@kms_plane@plane-panning-bottom-right-pipe-a-planes.html
   [62]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14601/shard-skl5/igt@kms_plane@plane-panning-bottom-right-pipe-a-planes.html

  * igt@kms_plane_alpha_blend@pipe-b-coverage-7efc:
    - shard-skl:          [PASS][63] -> [FAIL][64] ([fdo#108145] / [fdo#110403])
   [63]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6980/shard-skl7/igt@kms_plane_alpha_blend@pipe-b-coverage-7efc.html
   [64]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14601/shard-skl3/igt@kms_plane_alpha_blend@pipe-b-coverage-7efc.html

  * igt@kms_psr@dpms:
    - shard-iclb:         [PASS][65] -> [FAIL][66] ([fdo#107383] / [fdo#110215])
   [65]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6980/shard-iclb4/igt@kms_psr@dpms.html
   [66]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14601/shard-iclb2/igt@kms_psr@dpms.html

  * igt@kms_psr@psr2_cursor_plane_onoff:
    - shard-iclb:         [PASS][67] -> [SKIP][68] ([fdo#109441]) +1 similar issue
   [67]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6980/shard-iclb2/igt@kms_psr@psr2_cursor_plane_onoff.html
   [68]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14601/shard-iclb3/igt@kms_psr@psr2_cursor_plane_onoff.html

  * igt@prime_busy@hang-bsd2:
    - shard-iclb:         [PASS][69] -> [SKIP][70] ([fdo#109276]) +14 similar issues
   [69]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6980/shard-iclb2/igt@prime_busy@hang-bsd2.html
   [70]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14601/shard-iclb5/igt@prime_busy@hang-bsd2.html

  
#### Possible fixes ####

  * igt@gem_ctx_create@basic-files:
    - shard-iclb:         [INCOMPLETE][71] ([fdo#107713] / [fdo#109100]) -> [PASS][72]
   [71]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6980/shard-iclb1/igt@gem_ctx_create@basic-files.html
   [72]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14601/shard-iclb8/igt@gem_ctx_create@basic-files.html

  * igt@gem_ctx_isolation@rcs0-s3:
    - shard-apl:          [DMESG-WARN][73] ([fdo#108566]) -> [PASS][74] +5 similar issues
   [73]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6980/shard-apl8/igt@gem_ctx_isolation@rcs0-s3.html
   [74]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14601/shard-apl7/igt@gem_ctx_isolation@rcs0-s3.html

  * igt@gem_eio@in-flight-contexts-1us:
    - shard-hsw:          [FAIL][75] ([fdo#105957]) -> [PASS][76]
   [75]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6980/shard-hsw7/igt@gem_eio@in-flight-contexts-1us.html
   [76]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14601/shard-hsw8/igt@gem_eio@in-flight-contexts-1us.html

  * {igt@gem_eio@kms}:
    - shard-glk:          [DMESG-WARN][77] -> [PASS][78]
   [77]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6980/shard-glk4/igt@gem_eio@kms.html
   [78]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14601/shard-glk5/igt@gem_eio@kms.html

  * igt@gem_exec_reloc@basic-write-wc-active:
    - shard-skl:          [DMESG-WARN][79] ([fdo#106107]) -> [PASS][80]
   [79]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6980/shard-skl8/igt@gem_exec_reloc@basic-write-wc-active.html
   [80]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14601/shard-skl3/igt@gem_exec_reloc@basic-write-wc-active.html

  * igt@gem_exec_schedule@preempt-other-bsd:
    - shard-iclb:         [SKIP][81] ([fdo#111325]) -> [PASS][82] +3 similar issues
   [81]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6980/shard-iclb1/igt@gem_exec_schedule@preempt-other-bsd.html
   [82]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14601/shard-iclb8/igt@gem_exec_schedule@preempt-other-bsd.html

  * igt@gem_exec_schedule@preempt-queue-bsd1:
    - shard-iclb:         [SKIP][83] ([fdo#109276]) -> [PASS][84] +18 similar issues
   [83]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6980/shard-iclb7/igt@gem_exec_schedule@preempt-queue-bsd1.html
   [84]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14601/shard-iclb1/igt@gem_exec_schedule@preempt-queue-bsd1.html

  * igt@gem_pipe_control_store_loop@reused-buffer:
    - shard-skl:          [TIMEOUT][85] ([fdo#111732 ]) -> [PASS][86]
   [85]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6980/shard-skl9/igt@gem_pipe_control_store_loop@reused-buffer.html
   [86]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14601/shard-skl10/igt@gem_pipe_control_store_loop@reused-buffer.html

  * igt@gem_userptr_blits@map-fixed-invalidate-busy:
    - shard-skl:          [DMESG-WARN][87] ([fdo#111870]) -> [PASS][88]
   [87]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6980/shard-skl3/igt@gem_userptr_blits@map-fixed-invalidate-busy.html
   [88]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14601/shard-skl4/igt@gem_userptr_blits@map-fixed-invalidate-busy.html

  * igt@gem_userptr_blits@map-fixed-invalidate-busy-gup:
    - shard-apl:          [DMESG-WARN][89] ([fdo#109385] / [fdo#111870]) -> [PASS][90] +1 similar issue
   [89]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6980/shard-apl1/igt@gem_userptr_blits@map-fixed-invalidate-busy-gup.html
   [90]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14601/shard-apl1/igt@gem_userptr_blits@map-fixed-invalidate-busy-gup.html

  * igt@gem_userptr_blits@map-fixed-invalidate-overlap-busy:
    - shard-hsw:          [DMESG-WARN][91] ([fdo#111870]) -> [PASS][92]
   [91]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6980/shard-hsw5/igt@gem_userptr_blits@map-fixed-invalidate-overlap-busy.html
   [92]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14601/shard-hsw6/igt@gem_userptr_blits@map-fixed-invalidate-overlap-busy.html

  * igt@gem_userptr_blits@map-fixed-invalidate-overlap-busy-gup:
    - shard-glk:          [DMESG-WARN][93] ([fdo#111870]) -> [PASS][94]
   [93]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6980/shard-glk3/igt@gem_userptr_blits@map-fixed-invalidate-overlap-busy-gup.html
   [94]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14601/shard-glk4/igt@gem_userptr_blits@map-fixed-invalidate-overlap-busy-gup.html

  * igt@i915_selftest@mock_vma:
    - shard-skl:          [DMESG-WARN][95] ([fdo#111874]) -> [PASS][96]
   [95]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6980/shard-skl10/igt@i915_selftest@mock_vma.html
   [96]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14601/shard-skl9/igt@i915_selftest@mock_vma.html

  * igt@i915_suspend@fence-restore-tiled2untiled:
    - shard-iclb:         [INCOMPLETE][97] ([fdo#107713]) -> [PASS][98]
   [97]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6980/shard-iclb3/igt@i915_suspend@fence-restore-tiled2untiled.html
   [98]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14601/shard-iclb1/igt@i915_suspend@fence-restore-tiled2untiled.html

  * igt@kms_busy@extended-modeset-hang-newfb-render-c:
    - shard-kbl:          [DMESG-WARN][99] ([fdo#103558] / [fdo#105602] / [fdo#110222]) -> [PASS][100]
   [99]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6980/shard-kbl3/igt@kms_busy@extended-modeset-hang-newfb-render-c.html
   [100]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14601/shard-kbl1/igt@kms_busy@extended-modeset-hang-newfb-render-c.html

  * igt@kms_cursor_edge_walk@pipe-b-128x128-top-edge:
    - shard-snb:          [SKIP][101] ([fdo#109271] / [fdo#109278]) -> [PASS][102]
   [101]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6980/shard-snb6/igt@kms_cursor_edge_walk@pipe-b-128x128-top-edge.html
   [102]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14601/shard-snb5/igt@kms_cursor_edge_walk@pipe-b-128x128-top-edge.html

  * igt@kms_cursor_legacy@flip-vs-cursor-atomic-transitions:
    - shard-skl:          [FAIL][103] ([fdo#102670]) -> [PASS][104]
   [103]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6980/shard-skl9/igt@kms_cursor_legacy@flip-vs-cursor-atomic-transitions.html
   [104]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14601/shard-skl10/igt@kms_cursor_legacy@flip-vs-cursor-atomic-transitions.html

  * igt@kms_cursor_legacy@pipe-b-torture-bo:
    - shard-kbl:          [DMESG-WARN][105] ([fdo#107122]) -> [PASS][106]
   [105]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6980/shard-kbl7/igt@kms_cursor_legacy@pipe-b-torture-bo.html
   [106]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14601/shard-kbl4/igt@kms_cursor_legacy@pipe-b-torture-bo.html

  * igt@kms_cursor_legacy@pipe-c-forked-move:
    - shard-kbl:          [DMESG-WARN][107] ([fdo#103558] / [fdo#105602]) -> [PASS][108] +32 similar issues
   [107]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6980/shard-

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14601/
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2019-10-01 13:40 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-27 16:34 [PATCH] drm/i915/userptr: Never allow userptr into the mappable GGTT Chris Wilson
2019-09-27 16:42 ` ✗ Fi.CI.CHECKPATCH: warning for " Patchwork
2019-09-27 17:05 ` ✓ Fi.CI.BAT: success " Patchwork
2019-09-28  8:05 ` ✗ Fi.CI.IGT: failure " Patchwork
2019-09-28  8:25 ` [PATCH v2] " Chris Wilson
2019-09-30 10:33   ` [Intel-gfx] " Tvrtko Ursulin
2019-09-30 11:17     ` Chris Wilson
2019-09-28  8:35 ` ✗ Fi.CI.CHECKPATCH: warning for drm/i915/userptr: Never allow userptr into the mappable GGTT (rev2) Patchwork
2019-09-28  9:25 ` ✓ Fi.CI.BAT: success " Patchwork
2019-09-28 19:13 ` ✗ Fi.CI.IGT: failure " Patchwork
2019-09-28 20:03 ` [PATCH] drm/i915/userptr: Never allow userptr into the mappable GGTT Sasha Levin
2019-10-01  9:39 ` ✗ Fi.CI.CHECKPATCH: warning for drm/i915/userptr: Never allow userptr into the mappable GGTT (rev3) Patchwork
2019-10-01 10:06 ` ✓ Fi.CI.BAT: success " Patchwork
2019-10-01 13:40 ` ✗ Fi.CI.IGT: failure " Patchwork

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.