Linux IOMMU Development
 help / color / mirror / Atom feed
From: Shyam Saini <shyamsaini@linux.microsoft.com>
To: jgg@ziepe.ca
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,
	shyamsaini@linux.microsoft.com, 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 12:34:58 -0700	[thread overview]
Message-ID: <20250403193458.158085-1-shyamsaini@linux.microsoft.com> (raw)
In-Reply-To: <20250131003618.GB2296753@ziepe.ca>

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?

> 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?

later we still have to [1] re-adjust the final iova list to IOVA range - resereved regions (msi)
[1] https://elixir.bootlin.com/linux/v6.13.1/source/drivers/vfio/vfio_iommu_type1.c#L2232

so either static or dynamic, we seems to need MSI allocation

Please let me know what you think about this?

Thanks,
Shyam

  reply	other threads:[~2025-04-03 19:35 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 [this message]
2025-04-03 23:26             ` Jason Gunthorpe

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=20250403193458.158085-1-shyamsaini@linux.microsoft.com \
    --to=shyamsaini@linux.microsoft.com \
    --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=jgg@ziepe.ca \
    --cc=linux-arm-kernel@lists.infradead.org \
    --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