All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jason Gunthorpe <jgg@ziepe.ca>
To: Ethan Zhao <etzhao1900@gmail.com>
Cc: Ethan Zhao <haifeng.zhao@linux.intel.com>,
	Baolu Lu <baolu.lu@linux.intel.com>,
	Yunhui Cui <cuiyunhui@bytedance.com>,
	dwmw2@infradead.org, joro@8bytes.org, will@kernel.org,
	robin.murphy@arm.com, iommu@lists.linux.dev,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] iommu/vt-d: fix system hang on reboot -f
Date: Thu, 27 Feb 2025 16:38:55 -0400	[thread overview]
Message-ID: <20250227203855.GI5011@ziepe.ca> (raw)
In-Reply-To: <f29818dc-a0a7-46c4-b541-1b469a6b3304@gmail.com>

On Thu, Feb 27, 2025 at 08:40:31AM +0800, Ethan Zhao wrote:
> 
> On 2/26/2025 9:04 PM, Jason Gunthorpe wrote:
> > On Wed, Feb 26, 2025 at 01:55:28PM +0800, Ethan Zhao wrote:
> > > > Provided the system does not respond to those events when this function
> > > > is called, it's fine to remove the lock.
> > > I agree.
> > I think it is running the destruction of the iommu far too late in the
> > process. IMHO it should be done after all the drivers have been
> > shutdown, before the CPUs go single threaded.
> 
> Hmm... so far it is fine, the iommu_shutdown only has a little work to
> do, disable the translation, the PMR disabling is just backward compatible,
> was deprecated already. if we move it to one position where all CPUs are
> cycling, we don't know what kind of user-land tasks left there (i.e. reboot -f
> case), it would be hard to full-fill the requirement of Intel VT-d, no ongoing
> transaction there on hardware when issue the translation disabling command.

There is no guarentee device dma is halted anyhow at this point either.

Jason

  reply	other threads:[~2025-02-27 20:38 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-25  6:48 [PATCH v2] iommu/vt-d: fix system hang on reboot -f Yunhui Cui
2025-02-25  7:01 ` Baolu Lu
2025-02-25  8:54   ` Ethan Zhao
2025-02-25 14:26     ` Jason Gunthorpe
2025-02-26  0:35       ` Ethan Zhao
2025-02-26  3:50       ` Ethan Zhao
2025-02-26  5:18         ` Baolu Lu
2025-02-26  5:55           ` Ethan Zhao
2025-02-26 13:04             ` Jason Gunthorpe
2025-02-27  0:40               ` Ethan Zhao
2025-02-27 20:38                 ` Jason Gunthorpe [this message]
2025-02-28  0:51                   ` Ethan Zhao
2025-02-28  2:18                     ` [External] " yunhui cui
2025-02-28  4:34                       ` Ethan Zhao

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=20250227203855.GI5011@ziepe.ca \
    --to=jgg@ziepe.ca \
    --cc=baolu.lu@linux.intel.com \
    --cc=cuiyunhui@bytedance.com \
    --cc=dwmw2@infradead.org \
    --cc=etzhao1900@gmail.com \
    --cc=haifeng.zhao@linux.intel.com \
    --cc=iommu@lists.linux.dev \
    --cc=joro@8bytes.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=robin.murphy@arm.com \
    --cc=will@kernel.org \
    /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.