devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jason Gunthorpe <jgg@ziepe.ca>
To: Shyam Saini <shyamsaini@linux.microsoft.com>
Cc: code@tyhicks.com, devicetree@vger.kernel.org,
	eahariha@linux.microsoft.com, eric.auger@redhat.com,
	iommu@lists.linux.dev, jacob.pan@linux.microsoft.com,
	linux-arm-kernel@lists.infradead.org, vijayb@linux.microsoft.com,
	virtualization@lists.linux.dev, will@kernel.org
Subject: Re: [PATCH 0/3] make MSI IOVA base address and its length configurable
Date: Thu, 3 Apr 2025 20:26:19 -0300	[thread overview]
Message-ID: <20250403232619.GA681099@ziepe.ca> (raw)
In-Reply-To: <20250403193458.158085-1-shyamsaini@linux.microsoft.com>

On Thu, Apr 03, 2025 at 12:34:58PM -0700, Shyam Saini wrote:
> Hi Jason,
> 
> > On Thu, Jan 30, 2025 at 03:21:37PM -0800, Shyam Saini wrote:
> > 
> > > Unfortunately, it is an HW issue.
> > 
> > Well, that's pretty bad to have built HW that can't DMA to low
> > addresses at all.. But OK.
> >  
> > > Are you okay with this passing custom MSI_IOVA via DTS approach ?
> > 
> > It isn't up to me, but I've understood the DT maintainers would reject
> > this as it isn't is describing HW but just a random Linux software
> > knob.
> > 
> 
> If i understood correctly MSI window IOVA is hw property, if yes
> then it should be accepted by DTS folks, did i misundertstand that?

It is not a HW property. The MSI window in the SMMU is entirely up to
software.

Yuor HW proprerty is the regions of IOVA that do not function in the
SMMU.

> > I think you should make selecting the sw_msi dynamic in Linux.
> 
> My understanding is that if we have to make it dynamic, we have to
> use iova allocator that would need iova_domain as a member of struct
> arm_smmu_domain, and allocate iova for MSI window dynamically using
> alloc_iova() in arm_smmu_get_resv_regions() is that what you meant
> when you mentioned selecting the sw_msi dynamically?

I would not structure it like that..

The simplest thing would be to have the SMMU driver have a list of
potential addresses and select the first one that does not intersect
with the non-working IOVA ranges.

Jason

      reply	other threads:[~2025-04-03 23:26 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-16 23:23 [PATCH 0/3] make MSI IOVA base address and its length configurable Shyam Saini
2025-01-16 23:23 ` [PATCH 3/3] arm-smmu: use dts passed MSI IOVA address and length Shyam Saini
2025-01-16 23:23 ` [PATCH 2/3] iommu: consolidate MSI_IOVA macro definitions Shyam Saini
2025-01-16 23:23 ` [PATCH 1/3] dt-bindings: iommu: add "arm,smmu-pci-msi-iova-data" property Shyam Saini
2025-01-20 14:26 ` [PATCH 0/3] make MSI IOVA base address and its length configurable Jason Gunthorpe
2025-01-21 21:49   ` Jacob Pan
     [not found]   ` <67901659.170a0220.20b206.f1f5SMTPIN_ADDED_BROKEN@mx.google.com>
2025-01-22  0:19     ` Jason Gunthorpe
2025-01-30 23:21       ` Shyam Saini
2025-01-31  0:36         ` Jason Gunthorpe
2025-04-03 19:34           ` Shyam Saini
2025-04-03 23:26             ` Jason Gunthorpe [this message]

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=20250403232619.GA681099@ziepe.ca \
    --to=jgg@ziepe.ca \
    --cc=code@tyhicks.com \
    --cc=devicetree@vger.kernel.org \
    --cc=eahariha@linux.microsoft.com \
    --cc=eric.auger@redhat.com \
    --cc=iommu@lists.linux.dev \
    --cc=jacob.pan@linux.microsoft.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=shyamsaini@linux.microsoft.com \
    --cc=vijayb@linux.microsoft.com \
    --cc=virtualization@lists.linux.dev \
    --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 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 NNTP newsgroup(s).