mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
Query and save the dirty log before shutting down the vhost-user device. This allows any final dirty memory ranges to be recorded before it becomes impossible to do that as the vhost-user handle has been closed. This is required to ensure that all memory writes have been correctly recorded that may be triggered by inflight I/O drains from vhost-user device state capture. One small implementation wrinkle: with local migrations there is no dirty logging (since we just pass the memory FD over the socket) so calling dirty_log() would generate an error. As there is no clean way to query if dirty logging has been started add a boolean to track if its active. Signed-off-by: Rob Bradford <rbradford@meta.com>