[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <Z6qLB3jV45zxPdZh@Asurada-Nvidia>
Date: Mon, 10 Feb 2025 15:25:59 -0800
From: Nicolin Chen <nicolinc@...dia.com>
To: Jason Gunthorpe <jgg@...dia.com>
CC: <kevin.tian@...el.com>, <tglx@...utronix.de>, <maz@...nel.org>,
<joro@...tes.org>, <will@...nel.org>, <robin.murphy@....com>,
<shuah@...nel.org>, <iommu@...ts.linux.dev>, <linux-kernel@...r.kernel.org>,
<linux-arm-kernel@...ts.infradead.org>, <linux-kselftest@...r.kernel.org>,
<eric.auger@...hat.com>, <baolu.lu@...ux.intel.com>, <yi.l.liu@...el.com>,
<yury.norov@...il.com>, <jacob.pan@...ux.microsoft.com>,
<patches@...ts.linux.dev>
Subject: Re: [PATCH v1 08/13] iommufd/device: Move sw_msi_start from igroup
to idev
On Sun, Feb 09, 2025 at 02:41:52PM -0400, Jason Gunthorpe wrote:
> On Sat, Feb 08, 2025 at 01:02:41AM -0800, Nicolin Chen wrote:
> > @@ -433,8 +433,8 @@ static int iommufd_group_setup_msi(struct iommufd_group *igroup,
> > list_for_each_entry(cur, &ictx->sw_msi_list, sw_msi_item) {
> > int rc;
> >
> > - if (cur->sw_msi_start != igroup->sw_msi_start ||
> > - !test_bit(cur->id, igroup->required_sw_msi.bitmap))
> > + if (cur->sw_msi_start != idev->sw_msi_start ||
> > + !test_bit(cur->id, idev->igroup->required_sw_msi.bitmap))
> > continue;
>
> So we end up creating seperate sw_msi_list items with unique IDs for
> every sw_msi_start?
>
> That indeed might work well, I will try to check it and think about
> this harder.
The sw_msi_list is still per-ictx, so there won't be items/ids
that overlap with their sw_msi windows, right?
Then, the per-HWPT bitmap could still protect the iommu_map(),
as the design wanted to? No?
Nicolin
Powered by blists - more mailing lists