From: Jacob Pan <jacob.jun.pan@linux.intel.com>
To: Jean-Philippe Brucker <jean-philippe@linaro.org>
Cc: LKML <linux-kernel@vger.kernel.org>,
iommu@lists.linux.dev, Lu Baolu <baolu.lu@linux.intel.com>,
Joerg Roedel <joro@8bytes.org>,
Jean-Philippe Brucker <jean-philippe@linaro.com>,
Robin Murphy <robin.murphy@arm.com>,
David Woodhouse <dwmw2@infradead.org>,
Raj Ashok <ashok.raj@intel.com>,
"Tian, Kevin" <kevin.tian@intel.com>, Yi Liu <yi.l.liu@intel.com>,
Jason Gunthorpe <jgg@nvidia.com>,
jacob.jun.pan@linux.intel.com
Subject: Re: [PATCH 2/2] iommu/ioasid: Remove custom IOASID allocator
Date: Mon, 13 Feb 2023 10:34:55 -0800 [thread overview]
Message-ID: <20230213103455.02f3ac37@jacob-builder> (raw)
In-Reply-To: <Y+pjTR80bnl9rMK1@myrica>
Hi Jean-Philippe,
On Mon, 13 Feb 2023 16:20:29 +0000, Jean-Philippe Brucker
<jean-philippe@linaro.org> wrote:
> On Fri, Feb 10, 2023 at 03:02:06PM -0800, Jacob Pan wrote:
> > Custom allocator feature was introduced to support VT-d's virtual
> > command, an enlightened interface designed for VMs to allocate PASIDs
> > from the host.
> >
> > As we remove/withdraw the VT-d virtual command feature, the sole user
> > of custom allocator, we can safely remove the custom allocator as well.
> > Effectively, this will return IOASID core to the original simple global
> > namespace allocator.
> >
> > Signed-off-by: Jacob Pan <jacob.jun.pan@linux.intel.com>
>
> You can also drop the spinlock.h include. With that:
>
good catch, thanks
> Reviewed-by: Jean-Philippe Brucker <jean-philippe@linaro.org>
>
> On a related note, it looks like 100b8a14a370 ("iommu/vt-d: Add pasid
> private data helpers") removed the last user of ioasid_set_data(). I guess
> that could be dropped too, unless you plan to still use it?
>
You are right, will remove.
I was planning on the other way around which will convert VT-d's private
pasid data helpers to common ioasid code, but when I look closer the
private pasid xa is just holding a list of pasid/mm which could be per iommu
not global. Another cleanup I suppose.
> We could also merge ioasid.c into iommu-sva.c at this point, since I
> haven't seen any interest for having multiple IOASID sets on Arm, but I'm
> not sure what the current plan is for vSVA on x86.
VT-d do plan to use global PASIDs for DMA API with PASIDs since the
work submited via ENQCMDS must use a PASID must != RIDPASID.
https://lore.kernel.org/lkml/20220518182120.1136715-1-jacob.jun.pan@linux.intel.com/T/
So I was thinking a separate ioasid_set for devices that allocates global
PASIDs for DMA API usage. ioasid_set will be useful here for limiting
lookup and resource management. e.g. PASIDs used under in-kernel DMA API
are not subject to cgroups.
> Thanks,
> Jean
>
>
Thanks,
Jacob
next prev parent reply other threads:[~2023-02-13 18:31 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-10 23:02 [PATCH 0/2] Remove VT-d virtual command interface Jacob Pan
2023-02-10 23:02 ` [PATCH 1/2] iommu/vt-d: Remove " Jacob Pan
2023-02-13 2:54 ` Tian, Kevin
2023-02-13 23:19 ` Jason Gunthorpe
2023-02-10 23:02 ` [PATCH 2/2] iommu/ioasid: Remove custom IOASID allocator Jacob Pan
2023-02-13 3:14 ` Tian, Kevin
2023-02-13 16:20 ` Jean-Philippe Brucker
2023-02-13 16:24 ` Jason Gunthorpe
2023-02-13 19:11 ` Jacob Pan
2023-02-13 19:42 ` Jason Gunthorpe
2023-02-13 18:34 ` Jacob Pan [this message]
2023-02-13 19:30 ` Jean-Philippe Brucker
2023-02-13 19:48 ` Jason Gunthorpe
2023-02-13 19:39 ` Jason Gunthorpe
2023-02-13 21:44 ` Jacob Pan
2023-02-13 23:18 ` Jason Gunthorpe
2023-02-13 23:43 ` Jacob Pan
2023-02-13 23:45 ` Jason Gunthorpe
2023-02-14 6:26 ` Tian, Kevin
2023-02-14 14:56 ` Jason Gunthorpe
2023-02-15 1:39 ` Tian, Kevin
2023-02-13 2:52 ` [PATCH 0/2] Remove VT-d virtual command interface Tian, Kevin
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=20230213103455.02f3ac37@jacob-builder \
--to=jacob.jun.pan@linux.intel.com \
--cc=ashok.raj@intel.com \
--cc=baolu.lu@linux.intel.com \
--cc=dwmw2@infradead.org \
--cc=iommu@lists.linux.dev \
--cc=jean-philippe@linaro.com \
--cc=jean-philippe@linaro.org \
--cc=jgg@nvidia.com \
--cc=joro@8bytes.org \
--cc=kevin.tian@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=robin.murphy@arm.com \
--cc=yi.l.liu@intel.com \
/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