LKML Archive mirror
 help / color / mirror / Atom feed
From: "Margolin, Michael" <mrgolin@amazon.com>
To: Jason Gunthorpe <jgg@ziepe.ca>
Cc: Tao Liu <ltao@redhat.com>, Gal Pressman <gal.pressman@linux.dev>,
	<sleybo@amazon.com>, <leon@kernel.org>,
	<kexec@lists.infradead.org>, <linux-kernel@vger.kernel.org>,
	<linux-rdma@vger.kernel.org>
Subject: Re: Implementing .shutdown method for efa module
Date: Mon, 1 Apr 2024 16:23:32 +0300	[thread overview]
Message-ID: <0e7dddff-d7f3-4617-83e6-f255449a282b@amazon.com> (raw)
In-Reply-To: <20240326153223.GF8419@ziepe.ca>

Jason

Thanks for your response, efa_remove() is performing reset to the device 
which should stop all DMA from the device.

Except skipping cleanups that are unnecessary for shutdown flow are 
there any other reasons to prefer a separate function for shutdown?


Michael

On 3/26/2024 5:32 PM, Jason Gunthorpe wrote:
> CAUTION: This email originated from outside of the organization. Do not click links or open attachments unless you can confirm the sender and know the content is safe.
>
>
>
> On Tue, Mar 26, 2024 at 02:34:45PM +0200, Margolin, Michael wrote:
>> Hi Tao,
>>
>> Thanks for bringing this up.
>>
>> I've unsuccessfully tried to reproduce this kernel panic using production
>> Red Hat 9.3 AMI (5.14.0-362.18.1.el9_3.aarch64).
>>
>> Are there any related changes in the kernel you are testing?
>>
>> Anyways we do need to handle shutdown properly, please let know if calling
>> to efa_remove solves your issue.
> efa_remove should not be used for shutdown..
>
> If you have an iommu in your system (smmuv3 for this ARM64 case) then
> drivers must implement a shutdown handler or you will risk data
> corruption on ARM64 sytems during crash.
>
> The shutdown handler must stop all DMA from the device.
>
> If you don't have an iommu then the shutdown handler shouldn't be
> critical.
>
> Jason

  reply	other threads:[~2024-04-01 13:24 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-25  2:10 Implementing .shutdown method for efa module Tao Liu
2024-03-25  8:06 ` Gal Pressman
2024-03-26  1:38   ` Tao Liu
2024-03-26 12:34     ` Margolin, Michael
2024-03-26 15:32       ` Jason Gunthorpe
2024-04-01 13:23         ` Margolin, Michael [this message]
2024-04-03 15:44           ` Jason Gunthorpe
2024-04-04  6:54             ` Margolin, Michael
2024-04-25  3:27             ` Tao Liu
2024-03-29 11:58       ` Tao Liu

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=0e7dddff-d7f3-4617-83e6-f255449a282b@amazon.com \
    --to=mrgolin@amazon.com \
    --cc=gal.pressman@linux.dev \
    --cc=jgg@ziepe.ca \
    --cc=kexec@lists.infradead.org \
    --cc=leon@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=ltao@redhat.com \
    --cc=sleybo@amazon.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).