Skip to content

Conversation

@eltrufas
Copy link

@eltrufas eltrufas commented Nov 28, 2025

QEMU relies on two VFIO mechanisms for retrieving estimated remaining data for a migration copy:

  • For devices that support precopy, the VFIO_MIG_GET_PRECOPY_INFO ioctl to estimate the numbers specific to precopy.
  • For all devices, the VFIO_DEVICE_FEATURE_MIG_DATA_SIZE device feature gives an estimate of data that needs to be stop copied.

This patch adds equivalents to vfio-user (VFIO_USER_MIG_GET_PRECOPY_INFO and VFIO_DEVICE_FEATURE_MIG_DATA_SIZE), so that the QEMU client can use more seamlessly use the existing VFIO migration logic for vfio-user devices.

Device backends must now implement two additional migration callbacks corresponding to the new requests if they support migration.

closes #822

QEMU relies on two VFIO mechanisms for retrieving estimated remaining
data for a migration copy:
* For devices that support precopy, the VFIO_MIG_GET_PRECOPY_INFO ioctl
  to estimate the numbers specific to precopy.
* For all devices, the VFIO_DEVICE_FEATURE_MIG_DATA_SIZE device feature
  gives an estimate of data that needs to be stop copied.

This patch adds equivalents to vfio-user (VFIO_USER_MIG_GET_PRECOPY_INFO
and VFIO_DEVICE_FEATURE_MIG_DATA_SIZE), so that the QEMU client can use
more seamlessly use the existing VFIO migration logic for vfio-user
devices.

Device backends must now implement two additional migration callbacks
corresponding to the new requests if they support migration.
@eltrufas eltrufas marked this pull request as draft November 28, 2025 22:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Consider adding VFIO_USER_GET_PRECOPY_INFO

1 participant