mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
A failed VFIO_DEVICE_FEATURE_MIG_DEVICE_STATE set can leave the device in its original state, midway along a combination transition, or in ERROR. The uAPI leaves recovery to the user, and from ERROR only a VFIO_DEVICE_RESET brings the device back to RUNNING. Previously a failed transition left the device wherever it landed, so one that reached ERROR stayed wedged for the life of the guest even though a reset would have recovered it. On a failed transition the caller now names an optional recovery state to attempt first, falling back to a device reset. Pause, resume, and the return to STOP after STOP_COPY name no recovery state, so their failure resets directly. The original transition error is always propagated and recovery failures are logged. Signed-off-by: Saravanan D <saravanand@crusoe.ai>