Kernel KVM virtualization development
 help / color / mirror / Atom feed
From: Yi Liu <yi.l.liu@intel.com>
To: "Tian, Kevin" <kevin.tian@intel.com>,
	"joro@8bytes.org" <joro@8bytes.org>,
	"jgg@nvidia.com" <jgg@nvidia.com>,
	"baolu.lu@linux.intel.com" <baolu.lu@linux.intel.com>
Cc: "alex.williamson@redhat.com" <alex.williamson@redhat.com>,
	"robin.murphy@arm.com" <robin.murphy@arm.com>,
	"eric.auger@redhat.com" <eric.auger@redhat.com>,
	"nicolinc@nvidia.com" <nicolinc@nvidia.com>,
	"kvm@vger.kernel.org" <kvm@vger.kernel.org>,
	"chao.p.peng@linux.intel.com" <chao.p.peng@linux.intel.com>,
	"iommu@lists.linux.dev" <iommu@lists.linux.dev>,
	"Duan, Zhenzhong" <zhenzhong.duan@intel.com>,
	"Pan, Jacob jun" <jacob.jun.pan@intel.com>
Subject: Re: [PATCH 1/2] iommu: Pass domain to remove_dev_pasid() op
Date: Thu, 28 Mar 2024 14:28:35 +0800	[thread overview]
Message-ID: <f76f09a6-5538-4e9f-9070-c09e307a5ea8@intel.com> (raw)
In-Reply-To: <BN9PR11MB527651B93FE5D2EA426678888C3B2@BN9PR11MB5276.namprd11.prod.outlook.com>

On 2024/3/28 11:12, Tian, Kevin wrote:
>> From: Liu, Yi L <yi.l.liu@intel.com>
>> Sent: Wednesday, March 27, 2024 8:55 PM
>>
>> @@ -3375,7 +3376,7 @@ int iommu_attach_device_pasid(struct
>> iommu_domain *domain,
>>
>>   	ret = __iommu_set_group_pasid(domain, group, pasid);
>>   	if (ret) {
>> -		__iommu_remove_group_pasid(group, pasid);
>> +		__iommu_remove_group_pasid(group, pasid, domain);
>>   		xa_erase(&group->pasid_array, pasid);
> 
> I didn't get why this patch alone fixes anything. You are passing the
> new domain which is same as original code which gets it from
> xarray.

you are right. This is to avoid getting domain from xarray in
remove_dev_pasid(). But this part is still the same with the
original code.

> so it is at most a non-functional refactoring with the next patch
> doing real fix?

yes. let me make it clearer.

-- 
Regards,
Yi Liu

  reply	other threads:[~2024-03-28  6:25 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-27 12:54 [PATCH 0/2] Two enhancements to iommu_at[de]tach_device_pasid() Yi Liu
2024-03-27 12:54 ` [PATCH 1/2] iommu: Pass domain to remove_dev_pasid() op Yi Liu
2024-03-27 13:02   ` Jason Gunthorpe
2024-03-27 13:10     ` Yi Liu
2024-03-28 12:38     ` Yi Liu
2024-03-28  3:12   ` Tian, Kevin
2024-03-28  6:28     ` Yi Liu [this message]
2024-03-27 12:54 ` [PATCH 2/2] iommu: Undo pasid attachment only for the devices that have succeeded Yi Liu
2024-03-27 13:05   ` Jason Gunthorpe
2024-03-27 13:12     ` Yi Liu
2024-03-28  3:15   ` Tian, Kevin
2024-03-28  6:29     ` Yi Liu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=f76f09a6-5538-4e9f-9070-c09e307a5ea8@intel.com \
    --to=yi.l.liu@intel.com \
    --cc=alex.williamson@redhat.com \
    --cc=baolu.lu@linux.intel.com \
    --cc=chao.p.peng@linux.intel.com \
    --cc=eric.auger@redhat.com \
    --cc=iommu@lists.linux.dev \
    --cc=jacob.jun.pan@intel.com \
    --cc=jgg@nvidia.com \
    --cc=joro@8bytes.org \
    --cc=kevin.tian@intel.com \
    --cc=kvm@vger.kernel.org \
    --cc=nicolinc@nvidia.com \
    --cc=robin.murphy@arm.com \
    --cc=zhenzhong.duan@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox