Re: [PATCH 0/6] Make set_dev_pasid op supportting domain replacement

Yi Liu
2024-08-16T06:04:34Z

On 2024/8/16 10:52, Baolu Lu wrote:
> On 8/16/24 9:19 AM, Yi Liu wrote:
>>> So the expectation is replace existing PASID from PASID table only if
>>> old_domain
>>> is passed. Otherwise sev_dev_pasid() should throw an error right?
>>>
>>
>> yes. If no old_domain passed in, then it is just a normal attachment. As
>> you are working on AMD iommu, it would be great if you can have a patch to
>> make the AMD set_dev_pasid() op suit this expectation. Then it can be
>> incorporated in this series. 🙂
>
> Perhaps this has been discussed before, but I can't recall. Out of
> curiosity, why not introduce a specific replace_dev_pasid callback?

you have a good memory. It was discussed in the below link. I suppose it
reached agreement at that time.

https://lore.kernel.org/linux-iommu/20240416174749.GI3637727@nvidia.com/

--
Regards,
Yi Liu