Pull VFIO updates from Alex Williamson: - Update QAT vfio-pci variant driver for Gen 5, 420xx devices (Vijay Sundar Selvamani, Suman Kumar Chakraborty, Giovanni Cabiddu) - Fix vfio selftest MMIO DMA mapping selftest (Alex Mastro) - Conversions to const struct class in support of class_create() deprecation (Jori Koolstra) - Improve selftest compiler compatibility by avoiding initializer on variable-length array (Manish Honap) - Define new uAPI for drivers supporting migration to advise user- space of new initial data for reducing target startup latency. Implemented for mlx5 vfio-pci variant driver (Yishai Hadas) - Enable vfio selftests on aarch64, not just cross-compiles reporting arm64 (Ted Logan) - Update vfio selftest driver support to include additional DSA devices (Yi Lai) - Unconditionally include debugfs root pointer in vfio device struct, avoiding a build failure seen in hisi_acc variant driver without debugfs otherwise (Arnd Bergmann) - Add support for the s390 ISM (Internal Shared Memory) device via a new variant driver. The device is unique in the size of its BAR space (256TiB) and lack of mmap support (Julian Ruess) - Enforce that vfio-pci drivers implement a name in their ops structure for use in sequestering SR-IOV VFs (Alex Williamson) - Prune leftover group notifier code (Paolo Bonzini) - Fix Xe vfio-pci variant driver to avoid migration support as a dependency in the reset path and missing release call (Michał Winiarski) * tag 'vfio-v7.1-rc1' of https://github.com/awilliam/linux-vfio: (23 commits) vfio/xe: Add a missing vfio_pci_core_release_dev() vfio/xe: Reorganize the init to decouple migration from reset vfio: remove dead notifier code vfio/pci: Require vfio_device_ops.name MAINTAINERS: add VFIO ISM PCI DRIVER section vfio/ism: Implement vfio_pci driver for ISM devices vfio/pci: Rename vfio_config_do_rw() to vfio_pci_config_rw_single() and export it vfio: unhide vdev->debug_root vfio/qat: add support for Intel QAT 420xx VFs vfio: selftests: Support DMR and GNR-D DSA devices vfio: selftests: Build tests on aarch64 vfio/mlx5: Add REINIT support to VFIO_MIG_GET_PRECOPY_INFO vfio/mlx5: consider inflight SAVE during PRE_COPY net/mlx5: Add IFC bits for migration state vfio: Adapt drivers to use the core helper vfio_check_precopy_ioctl vfio: Add support for VFIO_DEVICE_FEATURE_MIG_PRECOPY_INFOv2 vfio: Define uAPI for re-init initial bytes during the PRE_COPY phase vfio: selftests: Fix VLA initialisation in vfio_pci_irq_set() vfio: uapi: fix comment typo vfio: mdev: replace mtty_dev->vd_class with a const struct class ...
Showing the changes to include/uapi/linux (1 of 30 files). Show all
Unified · Split
| @@ -141,7 +141,7 @@ struct vfio_info_cap_header { · 140 unmodified lines | |||
| 141 | * | 141 | * |
| 142 | * Retrieve information about the group. Fills in provided | 142 | * Retrieve information about the group. Fills in provided |
| 143 | * struct vfio_group_info. Caller sets argsz. | 143 | * struct vfio_group_info. Caller sets argsz. |
| 144 | * Return: 0 on succes, -errno on failure. | 144 | * Return: 0 on success, -errno on failure. |
| 145 | * Availability: Always | 145 | * Availability: Always |
| 146 | */ | 146 | */ |
| 147 | struct vfio_group_status { | 147 | struct vfio_group_status { |
| @@ -1266,6 +1266,19 @@ enum vfio_device_mig_state { · 1118 unmodified lines | |||
| 1266 | * The initial_bytes field indicates the amount of initial precopy | 1266 | * The initial_bytes field indicates the amount of initial precopy |
| 1267 | * data available from the device. This field should have a non-zero initial | 1267 | * data available from the device. This field should have a non-zero initial |
| 1268 | * value and decrease as migration data is read from the device. | 1268 | * value and decrease as migration data is read from the device. |
| 1269 | * The presence of the VFIO_PRECOPY_INFO_REINIT output flag indicates | ||
| 1270 | * that new initial data is present on the stream. | ||
| 1271 | * The new initial data may result, for example, from device reconfiguration | ||
| 1272 | * during migration that requires additional initialization data. | ||
| 1273 | * In that case initial_bytes may report a non-zero value irrespective of | ||
| 1274 | * any previously reported values, which progresses towards zero as precopy | ||
| 1275 | * data is read from the data stream. dirty_bytes is also reset | ||
| 1276 | * to zero and represents the state change of the device relative to the new | ||
| 1277 | * initial_bytes. | ||
| 1278 | * VFIO_PRECOPY_INFO_REINIT can be reported only after userspace opts in to | ||
| 1279 | * VFIO_DEVICE_FEATURE_MIG_PRECOPY_INFOv2. Without this opt-in, the flags field | ||
| 1280 | * of struct vfio_precopy_info is reserved for bug-compatibility reasons. | ||
| 1281 | * | ||
| 1269 | * It is recommended to leave PRE_COPY for STOP_COPY only after this field | 1282 | * It is recommended to leave PRE_COPY for STOP_COPY only after this field |
| 1270 | * reaches zero. Leaving PRE_COPY earlier might make things slower. | 1283 | * reaches zero. Leaving PRE_COPY earlier might make things slower. |
| 1271 | * | 1284 | * |
| @@ -1301,6 +1314,7 @@ enum vfio_device_mig_state { · 29 unmodified lines | |||
| 1301 | struct vfio_precopy_info { | 1314 | struct vfio_precopy_info { |
| 1302 | __u32 argsz; | 1315 | __u32 argsz; |
| 1303 | __u32 flags; | 1316 | __u32 flags; |
| 1317 | #define VFIO_PRECOPY_INFO_REINIT (1 << 0) /* output - new initial data is present */ | ||
| 1304 | __aligned_u64 initial_bytes; | 1318 | __aligned_u64 initial_bytes; |
| 1305 | __aligned_u64 dirty_bytes; | 1319 | __aligned_u64 dirty_bytes; |
| 1306 | }; | 1320 | }; |
| @@ -1510,6 +1524,16 @@ struct vfio_device_feature_dma_buf { · 203 unmodified lines | |||
| 1510 | struct vfio_region_dma_range dma_ranges[] __counted_by(nr_ranges); | 1524 | struct vfio_region_dma_range dma_ranges[] __counted_by(nr_ranges); |
| 1511 | }; | 1525 | }; |
| 1512 | 1526 | ||
| 1527 | /* | ||
| 1528 | * Enables the migration precopy_info_v2 behaviour. | ||
| 1529 | * | ||
| 1530 | * VFIO_DEVICE_FEATURE_MIG_PRECOPY_INFOv2. | ||
| 1531 | * | ||
| 1532 | * On SET, enables the v2 pre_copy_info behaviour, where the | ||
| 1533 | * vfio_precopy_info.flags is a valid output field. | ||
| 1534 | */ | ||
| 1535 | #define VFIO_DEVICE_FEATURE_MIG_PRECOPY_INFOv2 12 | ||
| 1536 | |||
| 1513 | /* -------- API for Type1 VFIO IOMMU -------- */ | 1537 | /* -------- API for Type1 VFIO IOMMU -------- */ |
| 1514 | 1538 | ||
| 1515 | /** | 1539 | /** |