Linux IOMMU Development
 help / color / mirror / Atom feed
From: "Edgar E. Iglesias" <edgar.iglesias-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: Will Deacon <will.deacon-5wv7dgnIgG8@public.gmane.org>
Cc: Julien Grall
	<julien.grall-Sxgqhf6Nn4DQT0dZR+AlfA@public.gmane.org>,
	"iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org"
	<iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org>
Subject: Re: ARM SMMU - Stall mode
Date: Fri, 20 Mar 2015 10:14:38 +1000	[thread overview]
Message-ID: <20150320001438.GF23658@toto> (raw)
In-Reply-To: <20150319165504.GD4751-5wv7dgnIgG8@public.gmane.org>

On Thu, Mar 19, 2015 at 04:55:05PM +0000, Will Deacon wrote:
> On Thu, Mar 19, 2015 at 06:52:07AM +0000, Edgar E. Iglesias wrote:
> > Hi,
> 
> Hello Edgar,
> 
> > I'm looking at adding models for the SMMU and it's stall feature to
> > Xilinx ZynqMP QEMU models. The stall mode is quite problematic to
> > model though. So I'm trying to figure out if I can get away without it :-)
> 
> Sure -- just make the context bank SCTLR.CFCFG fields RES0 and you'll be
> fine. The stall mode is optional in the architecture and not used by
> Linux.
> 
> > I was trying to figure from the kernel sources if the SMMU Stall mode
> > (for stalling and later resuming failed memory accesses) is used by
> > the kernel.
> > 
> > AFAICT, the stall mode is enabled by the SMMU driver but the users of
> > the report_iommu_fault() callbacks seem to all just do error reporting.
> > Do I understand correctly in that Linux/KVM is currently not really
> > depending on the stall function?
> > 
> > Are there any plans or ongoing work to implement paging features that
> > would require the stall/resume feature for IOMMUs?
> > E.g swapping of DMA:able memory, CoW etc.
> > 
> > I noticed that AMD has something in their HSA/KFD framework around it
> > but it seems quite AMD specific, please correct me if I'm wrong.
> 
> The main issue with the stall model is that it doesn't work nicely with
> PCI and is prone to deadlock on systems that haven't been designed with
> stalled transactions in mind. If/when Linux gets support for paged DMA
> memory this will probably be using ATS/PRI.

Thanks Will,

What is the situation for platform devices (non-PCI) hanging off on-chip
AXI interconnects for example, do you think the SMMUs stall mode would
be useful to Linux to do paged DMA?
Or is the stall mode unlikely to be used at all with current versions
of the SMMU?

Thanks again for your feedback!

Best regards,
Edgar

  parent reply	other threads:[~2015-03-20  0:14 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20150319065207.GE23658@toto>
2015-03-19 16:55 ` ARM SMMU - Stall mode Will Deacon
     [not found]   ` <20150319165504.GD4751-5wv7dgnIgG8@public.gmane.org>
2015-03-20  0:14     ` Edgar E. Iglesias [this message]
2015-03-23 10:38       ` Will Deacon

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=20150320001438.GF23658@toto \
    --to=edgar.iglesias-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
    --cc=iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org \
    --cc=julien.grall-Sxgqhf6Nn4DQT0dZR+AlfA@public.gmane.org \
    --cc=will.deacon-5wv7dgnIgG8@public.gmane.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