RE: [RFC v2 06/11] vfio: Move device open/close code to be helpfers

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

 



> From: Liu, Yi L <yi.l.liu@xxxxxxxxx>
> Sent: Thursday, November 24, 2022 8:27 PM
> 
> This makes the device open and close be in paired helpers.
> 
> vfio_device_open(), and vfio_device_close() handles the open_count, and
> calls vfio_device_first_open(), and vfio_device_last_close() when
> open_count condition is met. This also helps to avoid open code for device
> in the vfio_group_ioctl_get_device_fd(), and prepares for further moving

I didn't get which 'open code' is referred to here:

> @@ -918,7 +935,7 @@ static int vfio_group_ioctl_get_device_fd(struct
> vfio_group *group,
>  		goto err_put_device;
>  	}
> 
> -	filep = vfio_device_open(device);
> +	filep = vfio_device_open_file(device);

it's simply a replacement of function calls.




[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