Re: [PATCH v1 08/13] iommufd/device: Move sw_msi_start from igroup to idev

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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




[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux