From 735658a49df355fe0fc1d607f60a4305cde30e7f Mon Sep 17 00:00:00 2001 From: Rob Bradford Date: Fri, 14 Jan 2022 08:07:17 +0000 Subject: [PATCH] vm-migration: Add MemoryFd command for setting FDs for memory Signed-off-by: Rob Bradford --- vm-migration/src/protocol.rs | 5 +++++ vmm/src/lib.rs | 3 +++ 2 files changed, 8 insertions(+) diff --git a/vm-migration/src/protocol.rs b/vm-migration/src/protocol.rs index 828ffc64c..99989b2e7 100644 --- a/vm-migration/src/protocol.rs +++ b/vm-migration/src/protocol.rs @@ -41,6 +41,7 @@ pub enum Command { Memory, Complete, Abandon, + MemoryFd, } impl Default for Command { @@ -85,6 +86,10 @@ impl Request { Self::new(Command::Memory, length) } + pub fn memory_fd(length: u64) -> Self { + Self::new(Command::MemoryFd, length) + } + pub fn complete() -> Self { Self::new(Command::Complete, 0) } diff --git a/vmm/src/lib.rs b/vmm/src/lib.rs index 4c0e1529b..5d4731b1d 100644 --- a/vmm/src/lib.rs +++ b/vmm/src/lib.rs @@ -937,6 +937,9 @@ impl Vmm { Response::error().write_to(&mut socket)?; } } + Command::MemoryFd => { + unimplemented!() + } Command::Complete => { info!("Complete Command Received"); if let Some(ref mut vm) = self.vm.as_mut() {