Re: [PATCH v3 4/4] iommufd: Extend IOMMU_GET_HW_INFO to report PASID capability

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

 



On Thu, Sep 12, 2024 at 06:17:29AM -0700, Yi Liu wrote:
> @@ -1242,6 +1245,28 @@ int iommufd_get_hw_info(struct iommufd_ucmd *ucmd)
>  	if (device_iommu_capable(idev->dev, IOMMU_CAP_DIRTY_TRACKING))
>  		cmd->out_capabilities |= IOMMU_HW_CAP_DIRTY_TRACKING;
>  
> +	cmd->out_max_pasid_log2 = 0;
> +
> +	if (dev_is_pci(idev->dev)) {
> +		struct pci_dev *pdev = to_pci_dev(idev->dev);
> +		int ctrl;
> +
> +		if (pdev->is_virtfn)
> +			pdev = pci_physfn(pdev);

Don't we do this twice now?

Let's just keep it in the pci core?

It looks Ok otherwise

Reviewed-by: Jason Gunthorpe <jgg@xxxxxxxxxx>

Jason




[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