
From: jiangdongxu <jiangdongxu1@huawei.com> virt inclusion category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I86ITO ---------------------------------------------------------------------- Introduce a new interface to set vdpa device migration status, Such as migration start/stop, pre_start/pre_stop, etc. Some vdpa device need to do some job in different state. As not all vdpa devices need to do this, this interface is optional. Signed-off-by: jiangdongxu <jiangdongxu1@huawei.com> --- include/linux/vdpa.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/include/linux/vdpa.h b/include/linux/vdpa.h index fffd6cd366bf..1ed264ec1ebb 100644 --- a/include/linux/vdpa.h +++ b/include/linux/vdpa.h @@ -352,6 +352,9 @@ struct vdpa_map_file { * @offset: offset of src addr of device state. * @src: userspace addr of device state * @len: device state buffer length. + * @set_mig_state Set device migration status. (optional) + * @vdev: vdpa device + * @status: migration status * @free: Free resources that belongs to vDPA (optional) * @vdev: vdpa device */ @@ -434,6 +437,9 @@ struct vdpa_config_ops { int (*set_dev_buffer)(struct vdpa_device *vdev, unsigned int offset, const void __user *src, unsigned int len); + /* device mig state ops */ + int (*set_mig_state)(struct vdpa_device *v, u8 state); + /* Free device resources */ void (*free)(struct vdpa_device *vdev); }; -- 2.27.0