* [Intel-gfx] [PATCH i-g-t 1/2] i915/gem_ctx_isolation: Protect inject_reset_context() from banning
@ 2021-01-05 11:19 Chris Wilson
2021-01-05 11:19 ` [Intel-gfx] [PATCH i-g-t 2/2] i915/gem_ctx_exec: Protect norecovery from being banned Chris Wilson
2021-01-05 11:21 ` [Intel-gfx] [PATCH i-g-t 1/2] i915/gem_ctx_isolation: Protect inject_reset_context() from banning Chris Wilson
0 siblings, 2 replies; 5+ messages in thread
From: Chris Wilson @ 2021-01-05 11:19 UTC (permalink / raw)
To: intel-gfx; +Cc: Venkata Ramana Nayana, Chris Wilson
Disable banning as we deliberately inject GPU resets to test isolation.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Venkata Ramana Nayana <venkata.ramana.nayana@intel.com>
---
tests/i915/gem_ctx_isolation.c | 13 ++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-)
diff --git a/tests/i915/gem_ctx_isolation.c b/tests/i915/gem_ctx_isolation.c
index 58a35b487..4f1742685 100644
--- a/tests/i915/gem_ctx_isolation.c
+++ b/tests/i915/gem_ctx_isolation.c
@@ -762,10 +762,21 @@ static void isolation(int fd,
#define S4 (4 << 8)
#define SLEEP_MASK (0xf << 8)
+static uint32_t create_reset_context(int i915)
+{
+ struct drm_i915_gem_context_param param = {
+ .ctx_id = gem_context_clone_with_engines(i915, 0),
+ .param = I915_CONTEXT_PARAM_BANNABLE,
+ };
+
+ gem_context_set_param(i915, ¶m);
+ return param.ctx_id;
+}
+
static void inject_reset_context(int fd, const struct intel_execution_engine2 *e)
{
struct igt_spin_factory opts = {
- .ctx = gem_context_clone_with_engines(fd, 0),
+ .ctx = create_reset_context(fd),
.engine = e->flags,
.flags = IGT_SPIN_FAST,
};
--
2.30.0
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [Intel-gfx] [PATCH i-g-t 2/2] i915/gem_ctx_exec: Protect norecovery from being banned
2021-01-05 11:19 [Intel-gfx] [PATCH i-g-t 1/2] i915/gem_ctx_isolation: Protect inject_reset_context() from banning Chris Wilson
@ 2021-01-05 11:19 ` Chris Wilson
2021-01-05 11:21 ` [Intel-gfx] [PATCH i-g-t 1/2] i915/gem_ctx_isolation: Protect inject_reset_context() from banning Chris Wilson
1 sibling, 0 replies; 5+ messages in thread
From: Chris Wilson @ 2021-01-05 11:19 UTC (permalink / raw)
To: intel-gfx; +Cc: Venkata Ramana Nayana, Chris Wilson
Disable banning as we deliberately inject GPU resets to test norecovery
handling.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Venkata Ramana Nayana <venkata.ramana.nayana@intel.com>
---
tests/i915/gem_ctx_exec.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/tests/i915/gem_ctx_exec.c b/tests/i915/gem_ctx_exec.c
index 897761856..c80a98473 100644
--- a/tests/i915/gem_ctx_exec.c
+++ b/tests/i915/gem_ctx_exec.c
@@ -171,14 +171,16 @@ static void norecovery(int i915)
for (int pass = 1; pass >= 0; pass--) {
struct drm_i915_gem_context_param param = {
.ctx_id = gem_context_create(i915),
- .param = I915_CONTEXT_PARAM_RECOVERABLE,
- .value = pass,
+ .param = I915_CONTEXT_PARAM_BANNABLE,
};
int expect = pass == 0 ? -EIO : 0;
igt_spin_t *spin;
gem_context_set_param(i915, ¶m);
+ param.param = I915_CONTEXT_PARAM_RECOVERABLE;
+ param.value = pass;
+ gem_context_set_param(i915, ¶m);
param.value = !pass;
gem_context_get_param(i915, ¶m);
igt_assert_eq(param.value, pass);
--
2.30.0
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [Intel-gfx] [PATCH i-g-t 1/2] i915/gem_ctx_isolation: Protect inject_reset_context() from banning
2021-01-05 11:19 [Intel-gfx] [PATCH i-g-t 1/2] i915/gem_ctx_isolation: Protect inject_reset_context() from banning Chris Wilson
2021-01-05 11:19 ` [Intel-gfx] [PATCH i-g-t 2/2] i915/gem_ctx_exec: Protect norecovery from being banned Chris Wilson
@ 2021-01-05 11:21 ` Chris Wilson
1 sibling, 0 replies; 5+ messages in thread
From: Chris Wilson @ 2021-01-05 11:21 UTC (permalink / raw)
To: intel-gfx; +Cc: Venkata Ramana Nayana
Quoting Chris Wilson (2021-01-05 11:19:26)
> Disable banning as we deliberately inject GPU resets to test isolation.
>
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Venkata Ramana Nayana <venkata.ramana.nayana@intel.com>
> ---
> tests/i915/gem_ctx_isolation.c | 13 ++++++++++++-
> 1 file changed, 12 insertions(+), 1 deletion(-)
>
> diff --git a/tests/i915/gem_ctx_isolation.c b/tests/i915/gem_ctx_isolation.c
> index 58a35b487..4f1742685 100644
> --- a/tests/i915/gem_ctx_isolation.c
> +++ b/tests/i915/gem_ctx_isolation.c
> @@ -762,10 +762,21 @@ static void isolation(int fd,
> #define S4 (4 << 8)
> #define SLEEP_MASK (0xf << 8)
>
> +static uint32_t create_reset_context(int i915)
> +{
> + struct drm_i915_gem_context_param param = {
> + .ctx_id = gem_context_clone_with_engines(i915, 0),
An alternative is that we pass CLONE_FLAGS to
gem_context_clone_with_engines(). Danger is context_clone_with_engines
is widely used.
-Chris
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Intel-gfx] [PATCH i-g-t 1/2] i915/gem_ctx_isolation: Protect inject_reset_context() from banning
2021-01-05 11:25 Chris Wilson
@ 2021-01-06 6:22 ` Nayana, Venkata Ramana
0 siblings, 0 replies; 5+ messages in thread
From: Nayana, Venkata Ramana @ 2021-01-06 6:22 UTC (permalink / raw)
To: Chris Wilson, intel-gfx; +Cc: igt-dev
> -----Original Message-----
> From: Chris Wilson <chris@chris-wilson.co.uk>
> Sent: Tuesday, January 5, 2021 4:56 PM
> To: intel-gfx@lists.freedesktop.org
> Cc: igt-dev@lists.freedesktop.org; Chris Wilson <chris@chris-wilson.co.uk>;
> Nayana, Venkata Ramana <venkata.ramana.nayana@intel.com>
> Subject: [PATCH i-g-t 1/2] i915/gem_ctx_isolation: Protect
> inject_reset_context() from banning
>
> Disable banning as we deliberately inject GPU resets to test isolation.
>
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Venkata Ramana Nayana <venkata.ramana.nayana@intel.com>
> ---
> tests/i915/gem_ctx_isolation.c | 13 ++++++++++++-
> 1 file changed, 12 insertions(+), 1 deletion(-)
>
> diff --git a/tests/i915/gem_ctx_isolation.c b/tests/i915/gem_ctx_isolation.c
> index 58a35b487..4f1742685 100644
> --- a/tests/i915/gem_ctx_isolation.c
> +++ b/tests/i915/gem_ctx_isolation.c
> @@ -762,10 +762,21 @@ static void isolation(int fd, #define S4 (4 << 8)
> #define SLEEP_MASK (0xf << 8)
>
> +static uint32_t create_reset_context(int i915) {
> + struct drm_i915_gem_context_param param = {
> + .ctx_id = gem_context_clone_with_engines(i915, 0),
> + .param = I915_CONTEXT_PARAM_BANNABLE,
> + };
> +
> + gem_context_set_param(i915, ¶m);
> + return param.ctx_id;
> +}
> +
> static void inject_reset_context(int fd, const struct intel_execution_engine2
> *e) {
> struct igt_spin_factory opts = {
> - .ctx = gem_context_clone_with_engines(fd, 0),
> + .ctx = create_reset_context(fd),
> .engine = e->flags,
> .flags = IGT_SPIN_FAST,
> };
> --
> 2.30.0
Reviewed-by: Venkata Ramana Nayana <venkata.ramana.nayana@intel.com>
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Intel-gfx] [PATCH i-g-t 1/2] i915/gem_ctx_isolation: Protect inject_reset_context() from banning
@ 2021-01-05 11:25 Chris Wilson
2021-01-06 6:22 ` Nayana, Venkata Ramana
0 siblings, 1 reply; 5+ messages in thread
From: Chris Wilson @ 2021-01-05 11:25 UTC (permalink / raw)
To: intel-gfx; +Cc: igt-dev, Venkata Ramana Nayana, Chris Wilson
Disable banning as we deliberately inject GPU resets to test isolation.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Venkata Ramana Nayana <venkata.ramana.nayana@intel.com>
---
tests/i915/gem_ctx_isolation.c | 13 ++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-)
diff --git a/tests/i915/gem_ctx_isolation.c b/tests/i915/gem_ctx_isolation.c
index 58a35b487..4f1742685 100644
--- a/tests/i915/gem_ctx_isolation.c
+++ b/tests/i915/gem_ctx_isolation.c
@@ -762,10 +762,21 @@ static void isolation(int fd,
#define S4 (4 << 8)
#define SLEEP_MASK (0xf << 8)
+static uint32_t create_reset_context(int i915)
+{
+ struct drm_i915_gem_context_param param = {
+ .ctx_id = gem_context_clone_with_engines(i915, 0),
+ .param = I915_CONTEXT_PARAM_BANNABLE,
+ };
+
+ gem_context_set_param(i915, ¶m);
+ return param.ctx_id;
+}
+
static void inject_reset_context(int fd, const struct intel_execution_engine2 *e)
{
struct igt_spin_factory opts = {
- .ctx = gem_context_clone_with_engines(fd, 0),
+ .ctx = create_reset_context(fd),
.engine = e->flags,
.flags = IGT_SPIN_FAST,
};
--
2.30.0
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply related [flat|nested] 5+ messages in thread
end of thread, other threads:[~2021-01-06 6:22 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-05 11:19 [Intel-gfx] [PATCH i-g-t 1/2] i915/gem_ctx_isolation: Protect inject_reset_context() from banning Chris Wilson
2021-01-05 11:19 ` [Intel-gfx] [PATCH i-g-t 2/2] i915/gem_ctx_exec: Protect norecovery from being banned Chris Wilson
2021-01-05 11:21 ` [Intel-gfx] [PATCH i-g-t 1/2] i915/gem_ctx_isolation: Protect inject_reset_context() from banning Chris Wilson
2021-01-05 11:25 Chris Wilson
2021-01-06 6:22 ` Nayana, Venkata Ramana
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.