Thread (28 messages) 28 messages, 4 authors, 2025-02-19

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

From: Nicolin Chen <hidden>
Date: 2025-02-10 23:26:21
Also in: linux-iommu, linux-kselftest, linux-patches, lkml

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:
quoted
@@ -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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help