Re: [PATCH rc v3] iommu: Fix nested pci_dev_reset_iommu_prepare/done()

From: Nicolin Chen

Date: Mon Mar 23 2026 - 16:18:47 EST


On Sat, Mar 21, 2026 at 03:39:30PM -0700, Nicolin Chen wrote:
> @@ -61,14 +61,14 @@ struct iommu_group {
> int id;
> struct iommu_domain *default_domain;
> struct iommu_domain *blocking_domain;
> - /*
> - * During a group device reset, @resetting_domain points to the physical
> - * domain, while @domain points to the attached domain before the reset.
> - */
> - struct iommu_domain *resetting_domain;
> struct iommu_domain *domain;
> struct list_head entry;
> unsigned int owner_cnt;
> + /*
> + * During a group device reset, @group is attached to @blocking_domain,
> + * while its @domain points to the attached domain before the reset.
> + */
> + unsigned int reset_cnt;

I found an issue in the sequent gdev-quarantine series. To fix that,
we would end up with two counters in the iommu_group, which could be
merged if it was named properly in the first place.

So, I plan to rename this 'reset_cnt' to:
+ /*
+ * Number of devices in the group undergoing or awaiting recovery.
+ * If non-zero, concurrent domain attachments are rejected.
+ */
+ unsigned int recovery_cnt;

I will respin a v4 shortly with the renaming.

Thanks
Nicolin