Linux IOMMU Development
 help / color / mirror / Atom feed
From: Jason Gunthorpe <jgg@nvidia.com>
To: Zhangfei Gao <zhangfei.gao@linaro.org>
Cc: Joerg Roedel <joro@8bytes.org>, Will Deacon <will@kernel.org>,
	jean-philippe <jean-philippe@linaro.org>,
	iommu@lists.linux.dev, kvm@vger.kernel.org,
	Wenkai Lin <linwenkai6@hisilicon.com>
Subject: Re: [PATCH] iommu/arm-smmu-v3: disable stall for quiet_cd
Date: Tue, 5 Dec 2023 21:30:39 -0400	[thread overview]
Message-ID: <20231206013039.GN2692119@nvidia.com> (raw)
In-Reply-To: <20231206005727.46150-1-zhangfei.gao@linaro.org>

On Wed, Dec 06, 2023 at 08:57:27AM +0800, Zhangfei Gao wrote:
> From: Wenkai Lin <linwenkai6@hisilicon.com>
> 
> In the stall model, invalid transactions were expected to be
> stalled and aborted by the IOPF handler.
> 
> However, when killing a test case with a huge amount of data, the
> accelerator streamline can not stop until all data is consumed
> even if the page fault handler reports errors. As a result, the
> kill may take a long time, about 10 seconds with numerous iopf
> interrupts.
> 
> So disable stall for quiet_cd in the non-force stall model, since
> force stall model (STALL_MODEL==0b10) requires CD.S must be 1.

I think this force-stall thing should get a closer look, it doesn't
look completely implemented and what does it mean for, eg, non-SVA
domains attached to the device (as we now support with S2 and soon
with PASID)

The manual says:

0b10 Stall is forced (all faults eligible to stall cause stall),
     STE.S2S and CD.S must be 1.

And there is a note:

 Note: For faulting transactions that are associated with client
 devices that have been configured to stall, but where
 the system has not explicitly advertised the client devices to be
 usable with the stall model, Arm recommends for
 software to expect that events might be recorded with Stall == 0.

Which makes it seem like it isn't actually "force" per-say, but
something else.

I notice the driver never sets STE.S2S, and it isn't entirely clear
what software should even do for a standard non-faulting domain where
non-present means failure? Take the fault event and always respond
with failure? What is the purpose?

Aside from that the change looks OK to me:

Reviewed-by: Jason Gunthorpe <jgg@nvidia.com>

Jason

  reply	other threads:[~2023-12-06  1:30 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-06  0:57 [PATCH] iommu/arm-smmu-v3: disable stall for quiet_cd Zhangfei Gao
2023-12-06  1:30 ` Jason Gunthorpe [this message]
2023-12-06 13:47   ` Zhangfei Gao
2023-12-06  9:57 ` Jean-Philippe Brucker
2023-12-06 13:46   ` Zhangfei Gao
2023-12-12 17:21 ` Will Deacon
2023-12-13  1:36   ` Zhangfei Gao

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=20231206013039.GN2692119@nvidia.com \
    --to=jgg@nvidia.com \
    --cc=iommu@lists.linux.dev \
    --cc=jean-philippe@linaro.org \
    --cc=joro@8bytes.org \
    --cc=kvm@vger.kernel.org \
    --cc=linwenkai6@hisilicon.com \
    --cc=will@kernel.org \
    --cc=zhangfei.gao@linaro.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox