RE: [PATCH V1 vfio 2/2] vfio: Split migration ops from main device ops

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

 



> From: Yishai Hadas <yishaih@xxxxxxxxxx>
> Sent: Sunday, June 26, 2022 4:40 PM
> @@ -1534,8 +1534,8 @@ vfio_ioctl_device_feature_mig_device_state(struct
> vfio_device *device,
>  	struct file *filp = NULL;
>  	int ret;
> 
> -	if (!device->ops->migration_set_state ||
> -	    !device->ops->migration_get_state)
> +	if (!device->mig_ops->migration_set_state ||
> +	    !device->mig_ops->migration_get_state)
>  		return -ENOTTY;
> 

device->mig_ops could be NULL.

I still think that it's cleaner to do above check when registering the device
while leaving only a simple check on mig_ops here and later. While at it
you can also include check on VFIO_MIGRATION_STOP_COPY since the uAPI
claims it must be set in migration_flags. All those checks can be done
once at registration point.




[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