RE: [PATCH v6 1/7] iommu: Prevent pasid attach if no ops->remove_dev_pasid

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

 



> From: Liu, Yi L <yi.l.liu@xxxxxxxxx>
> Sent: Wednesday, December 4, 2024 8:29 PM
> 
> driver should implement both set_dev_pasid and remove_dev_pasid op,
> otherwise
> it is a problem how to detach pasid. In reality, it is impossible that an
> iommu driver implements set_dev_pasid() but no remove_dev_pasid() op.
> However,
> it is better to check it.
> 
> Move the group check to be the first as dev_iommu_ops() may fail when
> there
> is no valid group. Also take the chance to remove the dev_has_iommu()
> check
> as it is duplicated to the group check.
> 
> Reviewed-by: Jason Gunthorpe <jgg@xxxxxxxxxx>
> Signed-off-by: Yi Liu <yi.l.liu@xxxxxxxxx>

Reviewed-by: Kevin Tian <kevin.tian@xxxxxxxxx>





[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