mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
vm-migration: be explicit about commands
Reordering commands or adding commands in-between is breaking the migration protocol. By using explicit numbers, we can increase the attention required when touching this code. On-behalf-of: SAP philipp.schuster@sap.com Signed-off-by: Philipp Schuster <philipp.schuster@cyberus-technology.de>
This commit is contained in:
committed by
Rob Bradford
parent
ba04c4f318
commit
5899d062bc
@@ -111,19 +111,19 @@ use crate::bitpos_iterator::BitposIteratorExt;
|
||||
#[derive(Debug, Copy, Clone, Default, PartialEq, Eq)]
|
||||
pub enum Command {
|
||||
#[default]
|
||||
Invalid,
|
||||
Start,
|
||||
Config,
|
||||
State,
|
||||
Memory,
|
||||
Invalid = 0,
|
||||
Start = 1,
|
||||
Config = 2,
|
||||
State = 3,
|
||||
Memory = 4,
|
||||
/// Finalizes the migration and resumes the VM on the destination.
|
||||
/// Sent when the source VM was running at migration time.
|
||||
Complete,
|
||||
Abandon,
|
||||
MemoryFd,
|
||||
Complete = 5,
|
||||
Abandon = 6,
|
||||
MemoryFd = 7,
|
||||
/// Finalizes the migration without resuming the VM on the destination.
|
||||
/// Sent when the source VM was paused at migration time.
|
||||
CompletePaused,
|
||||
CompletePaused = 8,
|
||||
}
|
||||
|
||||
#[repr(C)]
|
||||
|
||||
Reference in New Issue
Block a user