Re: [PATCH v3] vfio/pci: Fix vf_token mechanism when device-specific VF drivers are used

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

 



On Wed, 13 Apr 2022 10:10:36 -0300
Jason Gunthorpe <jgg@xxxxxxxxxx> wrote:
> @@ -1732,8 +1705,30 @@ static int vfio_pci_bus_notifier(struct notifier_block *nb,
>  static int vfio_pci_vf_init(struct vfio_pci_core_device *vdev)
>  {
>  	struct pci_dev *pdev = vdev->pdev;
> +	struct vfio_pci_core_device *cur;
> +	struct pci_dev *physfn;
>  	int ret;
>  
> +	if (pdev->is_virtfn) {
> +		/*
> +		 * If this VF was created by our vfio_pci_core_sriov_configure()
> +		 * then we can find the PF vfio_pci_core_device now, and due to
> +		 * the locking in pci_disable_sriov() it cannot change until
> +		 * this VF device driver is removed.
> +		 */
> +		physfn = pci_physfn(vdev->pdev);
> +		mutex_lock(&vfio_pci_sriov_pfs_mutex);
> +		list_for_each_entry (cur, &vfio_pci_sriov_pfs, sriov_pfs_item) {
                                   ^
                                   |
checkpatch noted the space here ----

Fixed on commit, looks good otherwise.  Applied to vfio for-linus
branch for v5.18.  Thanks,

Alex




[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