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

Reply via email to