All of lore.kernel.org
 help / color / mirror / Atom feed
From: Felix Kuehling <felix.kuehling@amd.com>
To: David Belanger <david.belanger@amd.com>, amd-gfx@lists.freedesktop.org
Cc: Jay Cornwall <Jay.Cornwall@amd.com>
Subject: Re: [PATCH] drm/amdgpu: Enable SA software trap.
Date: Thu, 22 Sep 2022 13:14:13 -0400	[thread overview]
Message-ID: <2943b204-2999-b6f7-1f30-bdeb85a711cb@amd.com> (raw)
In-Reply-To: <20220922161703.916705-1-david.belanger@amd.com>

Am 2022-09-22 um 12:17 schrieb David Belanger:
> Enables support for software trap for MES >= 4.
> Adapted from implementation from Jay Cornwall.
>
> v2: Add IP version check in conditions.
>
> Signed-off-by: Jay Cornwall <Jay.Cornwall@amd.com>
> Signed-off-by: David Belanger <david.belanger@amd.com>
> Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com>
> ---
>   drivers/gpu/drm/amd/amdgpu/mes_v11_0.c        |   6 +-
>   .../gpu/drm/amd/amdkfd/cwsr_trap_handler.h    | 771 +++++++++---------
>   .../amd/amdkfd/cwsr_trap_handler_gfx10.asm    |  21 +
>   .../gpu/drm/amd/amdkfd/kfd_int_process_v11.c  |  26 +-
>   4 files changed, 437 insertions(+), 387 deletions(-)
[snip]
> diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_int_process_v11.c b/drivers/gpu/drm/amd/amdkfd/kfd_int_process_v11.c
> index a6fcbeeb7428..4e03d19e9333 100644
> --- a/drivers/gpu/drm/amd/amdkfd/kfd_int_process_v11.c
> +++ b/drivers/gpu/drm/amd/amdkfd/kfd_int_process_v11.c
> @@ -358,13 +358,35 @@ static void event_interrupt_wq_v11(struct kfd_dev *dev,
>   				break;
>   			case SQ_INTERRUPT_WORD_ENCODING_ERROR:
>   				print_sq_intr_info_error(context_id0, context_id1);
> +				sq_int_priv = REG_GET_FIELD(context_id0,
> +						SQ_INTERRUPT_WORD_WAVE_CTXID0, PRIV);
>   				sq_int_errtype = REG_GET_FIELD(context_id0,
>   						SQ_INTERRUPT_WORD_ERROR_CTXID0, TYPE);
> -				if (sq_int_errtype != SQ_INTERRUPT_ERROR_TYPE_ILLEGAL_INST &&
> -				    sq_int_errtype != SQ_INTERRUPT_ERROR_TYPE_MEMVIOL) {
> +
> +				switch (sq_int_errtype) {
> +				case SQ_INTERRUPT_ERROR_TYPE_EDC_FUE:
> +				case SQ_INTERRUPT_ERROR_TYPE_EDC_FED:
>   					event_interrupt_poison_consumption_v11(
>   							dev, pasid, source_id);
>   					return;
> +				case SQ_INTERRUPT_ERROR_TYPE_ILLEGAL_INST:
> +					/*if (!(((adev->mes.sched_version & AMDGPU_MES_VERSION_MASK) >= 4) &&
> +						  (adev->ip_versions[GC_HWIP][0] >= IP_VERSION(11, 0, 0)) &&
> +						  (adev->ip_versions[GC_HWIP][0] <= IP_VERSION(11, 0, 3)))
> +						&& sq_int_priv)
> +						kfd_set_dbg_ev_from_interrupt(dev, pasid, -1,
> +							KFD_EC_MASK(EC_QUEUE_WAVE_ILLEGAL_INSTRUCTION),
> +							NULL, 0);*/
> +					return;
> +				case SQ_INTERRUPT_ERROR_TYPE_MEMVIOL:
> +					/*if (!(((adev->mes.sched_version & AMDGPU_MES_VERSION_MASK) >= 4) &&
> +						  (adev->ip_versions[GC_HWIP][0] >= IP_VERSION(11, 0, 0)) &&
> +						  (adev->ip_versions[GC_HWIP][0] <= IP_VERSION(11, 0, 3)))
> +						&& sq_int_priv)
> +						kfd_set_dbg_ev_from_interrupt(dev, pasid, -1,
> +							KFD_EC_MASK(EC_QUEUE_WAVE_MEMORY_VIOLATION),
> +							NULL, 0);*/

Which branch is this for? kfd_set_dbg_ev_from_interrupt shouldn't exist 
on the upstream branch yet. That code is still under review for upstream.

Regards,
   Felix


> +					return;
>   				}
>   				break;
>   			default:

  parent reply	other threads:[~2022-09-22 17:14 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-22 16:17 [PATCH] drm/amdgpu: Enable SA software trap David Belanger
2022-09-22 16:27 ` Alex Deucher
2022-09-22 17:14 ` Felix Kuehling [this message]
2022-09-22 17:57   ` Belanger, David
2022-09-22 19:16     ` Felix Kuehling
2022-09-22 17:56 ` Sider, Graham
2022-09-22 18:49   ` Belanger, David
2022-09-22 19:07     ` Sider, Graham

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2943b204-2999-b6f7-1f30-bdeb85a711cb@amd.com \
    --to=felix.kuehling@amd.com \
    --cc=Jay.Cornwall@amd.com \
    --cc=amd-gfx@lists.freedesktop.org \
    --cc=david.belanger@amd.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.