Add an option to get migration data size by introducing a new migration feature named VFIO_DEVICE_FEATURE_MIG_DATA_SIZE. Upon VFIO_DEVICE_FEATURE_GET the estimated data length that will be required to complete STOP_COPY is returned. This option may better enable user space to consider before moving to STOP_COPY whether it can meet the downtime SLA based on the returned data. The patch also includes the implementation for mlx5 and hisi for this new option to make it feature complete for the existing drivers in this area.
Showing the changes to include/uapi (1 of 6 files). Show all
Unified · Split
| @@ -1128,6 +1128,19 @@ struct vfio_device_feature_dma_logging_report { · 1127 unmodified lines | ||
| 1128 | 1128 | |
| 1129 | 1129 | #define VFIO_DEVICE_FEATURE_DMA_LOGGING_REPORT 8 |
| 1130 | 1130 | |
| 1131 | +/* | |
| 1132 | + * Upon VFIO_DEVICE_FEATURE_GET read back the estimated data length that will | |
| 1133 | + * be required to complete stop copy. | |
| 1134 | + * | |
| 1135 | + * Note: Can be called on each device state. | |
| 1136 | + */ | |
| 1137 | + | |
| 1138 | +struct vfio_device_feature_mig_data_size { | |
| 1139 | + __aligned_u64 stop_copy_length; | |
| 1140 | +}; | |
| 1141 | + | |
| 1142 | +#define VFIO_DEVICE_FEATURE_MIG_DATA_SIZE 9 | |
| 1143 | + | |
| 1131 | 1144 | /* -------- API for Type1 VFIO IOMMU -------- */ |
| 1132 | 1145 | |
| 1133 | 1146 | /** |