Re: [PATCH v4 05/13] iommu/vt-d: Prepare intel_iommu_set_dev_pasid() handle replacement

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 2024/11/5 10:49, Baolu Lu wrote:
On 11/4/24 21:18, Yi Liu wrote:
To handle domain replacement, the intel_iommu_set_dev_pasid() needs to
keep the old configuration and the prepare for the new setup. This requires
a bit refactoring to prepare for it.

Above description is a bit hard to understand, are you saying

... the intel_iommu_set_dev_pasid() needs to roll back to the old
configuration in the failure path, therefore refactor it to prepare for
the subsequent patches ...

This is the partial reason, but not the most related reason of this patch.
Say without this patch, the intel_iommu_set_dev_pasid() call avoid roll
back to the old configuration in the failure path as long as it calls the
pasid replace helpers. So I chose to describe like the above. Maybe another
choice is to name this patch as consolidate the dev_pasid_info adding and
removing to be a paired helpers. This can be used by other set_dev_pasid op
within intel iommu driver.

?


domain_add_dev_pasid() and domain_remove_dev_pasid() are added to add/remove
the dev_pasid_info which represents the association of the pasid/device and
domain. Till now, it's still not ready for replacement yet.

Signed-off-by: Yi Liu<yi.l.liu@xxxxxxxxx>
---
  drivers/iommu/intel/iommu.c | 90 +++++++++++++++++++++++++------------
  1 file changed, 61 insertions(+), 29 deletions(-)

The change itself looks good to me,

Reviewed-by: Lu Baolu <baolu.lu@xxxxxxxxxxxxxxx>


--
Regards,
Yi Liu




[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux