RE: [PATCH v12 vfio 2/7] vfio/pds: Initial support for pds VFIO driver

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

 



> From: Brett Creeley <brett.creeley@xxxxxxx>
> Sent: Thursday, July 20, 2023 6:35 AM
> 
> +
> +static int pds_vfio_init_device(struct vfio_device *vdev)
> +{
> +	struct pds_vfio_pci_device *pds_vfio =
> +		container_of(vdev, struct pds_vfio_pci_device,
> +			     vfio_coredev.vdev);
> +	struct pci_dev *pdev = to_pci_dev(vdev->dev);
> +	int err, vf_id;
> +
> +	err = vfio_pci_core_init_dev(vdev);
> +	if (err)
> +		return err;
> +
> +	vf_id = pci_iov_vf_id(pdev);
> +	if (vf_id < 0)
> +		return vf_id;

this returns w/o reverting what vfio_pci_core_init_dev() does.

A simpler way is to move it to the start.





[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