Re: [PATCH 08/12] iommufd/selftest: Put iopf enablement in domain attach path
From: Jason Gunthorpe
Date: Fri Feb 21 2025 - 10:05:00 EST
On Fri, Feb 21, 2025 at 09:31:48AM +0800, Baolu Lu wrote:
> How about below change?
Sure
> - return mock_dev_enable_iopf(dev, domain);
> + if (mdev->domain)
> + mock_dev_disable_iopf(dev, mdev->domain);
> +
> + ret = mock_dev_enable_iopf(dev, domain);
> + if (ret)
Though here the domain is disabled but not removed from mdev->domain,
is it OK?
Jason