mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
Probe VFIO_DEVICE_FEATURE_MIGRATION during VfioCommon::new() and store the result in a new migration_flags field so later migration phases can gate state machine transitions. The probe runs on every instantiation, including snapshot restore, because migration capability is a property of the host kernel and its variant driver rather than of any saved VM state. migration_flags() is added to the internal Vfio trait with a default implementation that returns Ok(None), meaning not migratable. VfioDeviceWrapper overrides it to issue the kernel ioctl, while vfio-user devices keep the default and are always treated as non migratable. Allow the VFIO_DEVICE_FEATURE ioctl in the VMM seccomp filter. Signed-off-by: Saravanan D <saravanand@crusoe.ai>