From: Joonwon Kang <joonwonkang@google.com>
To: joonwonkang@google.com
Cc: Alexander.Grest@microsoft.com, amhetre@nvidia.com,
baolu.lu@linux.intel.com, iommu@lists.linux.dev, jgg@ziepe.ca,
joro@8bytes.org, kees@kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, nicolinc@nvidia.com,
praan@google.com, robin.murphy@arm.com, smostafa@google.com,
will@kernel.org
Subject: Re: [PATCH RFC] iommu: Enable per-device SSID space for SVA
Date: Fri, 24 Apr 2026 08:57:53 +0000 [thread overview]
Message-ID: <20260424085753.3505585-1-joonwonkang@google.com> (raw)
In-Reply-To: <20260424085011.3502295-1-joonwonkang@google.com>
> For SVA, the IOMMU core always allocates PASID from the global PASID
> space. The use of this global PASID space comes from the limitation of
> the ENQCMD instruction in Intel CPUs that it fetches its PASID operand
> from IA32_PASID, which is per-task.
>
> Due to this nature, SVA with ARM SMMU v3 has been found not working in
> our environment when other modules/devices compete for PASID. The
> environment looks as follows:
>
> - The device is not a PCIe device.
> - The device is to use SVA.
> - The supported SSID/PASID space is very small for the device; only 1 to
> 3 SSIDs are supported.
> - There is a custom way of transmitting the SSID from the kernel to the
> device.
>
> With this setup, when other modules have allocated all the PASIDs that
> our device is expected to use from the global PASID space via APIs like
> iommu_alloc_global_pasid() or iommu_sva_bind_device(), SVA binding to
> our device fails due to the lack of available PASIDs.
>
> Since SSID/PASID is supported per-SID in ARM SMMU v3, this commit
> leverages the fact and lifts the use of the global PASID space if
> possible. What it does includes:
>
> - Introduce a new IOMMU capability IOMMU_CAP_PER_DEV_PASID_SPACE, which
> represents whether the IOMMU supports an independent PASID space per-
> device, not shared across devices. ARM SMMU v3 is the case.
> - Open a new API iommu_attach_device_pasid_any() to allocate any
> available PASID and attach an IOMMU domain to it.
> - Opt out the use of the global PASID space for SVA if the IOMMU has
> that capability, and use the new API to allocate a PASID in that case.
>
> Signed-off-by: Joonwon Kang <joonwonkang@google.com>
Please disregard this RFC as I have sent a new one with more recipients.
Thanks,
Joonwon Kang
next prev parent reply other threads:[~2026-04-24 8:58 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-24 8:50 [PATCH RFC] iommu: Enable per-device SSID space for SVA Joonwon Kang
2026-04-24 8:57 ` Joonwon Kang [this message]
-- strict thread matches above, loose matches on Subject: below --
2026-04-24 8:53 Joonwon Kang
2026-04-24 13:39 ` Jason Gunthorpe
2026-05-07 8:15 ` Tian, Kevin
2026-05-09 17:03 ` Jason Gunthorpe
2026-05-07 9:58 ` Joonwon Kang
2026-05-09 17:10 ` Jason Gunthorpe
2026-05-11 12:39 ` Robin Murphy
2026-05-11 13:21 ` Jason Gunthorpe
2026-05-12 9:57 ` Joonwon Kang
2026-05-12 12:40 ` Jason Gunthorpe
2026-05-12 13:53 ` Robin Murphy
2026-05-12 14:51 ` Joonwon Kang
2026-05-12 15:11 ` Jason Gunthorpe
2026-05-13 17:03 ` Joonwon Kang
2026-05-13 17:10 ` Jason Gunthorpe
2026-05-14 4:12 ` Joonwon Kang
2026-05-12 10:07 ` Joonwon Kang
2026-04-28 17:38 ` Easwar Hariharan
2026-04-28 17:44 ` 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=20260424085753.3505585-1-joonwonkang@google.com \
--to=joonwonkang@google.com \
--cc=Alexander.Grest@microsoft.com \
--cc=amhetre@nvidia.com \
--cc=baolu.lu@linux.intel.com \
--cc=iommu@lists.linux.dev \
--cc=jgg@ziepe.ca \
--cc=joro@8bytes.org \
--cc=kees@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nicolinc@nvidia.com \
--cc=praan@google.com \
--cc=robin.murphy@arm.com \
--cc=smostafa@google.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.