Lines Matching +full:send +full:- +full:migration
3 // SPDX-License-Identifier: Apache-2.0
13 // Migration protocol
16 // 2: Source -> Dest : send "start command"
17 // 3: Dest -> Source : sends "ok response" when read to accept state data
18 // 4: Source -> Dest : sends "config command" followed by config data, length
20 // 5: Dest -> Source : sends "ok response" when ready to accept memory data
21 // 6: Source -> Dest : send "memory command" followed by table of u64 pairs (GPA, size)
24 // 7: Dest -> Source : sends "ok response" when ready to accept more memory data
25 // 8..(n-4): Repeat steps 6 and 7 until source has no more memory to send
26 // (n-3): Source -> Dest : sends "state command" followed by state data, length
28 // (n-2): Dest -> Source : sends "ok response"
29 // (n-1): Source -> Dest : send "complete command"
30 // n: Dest -> Source: sends "ok response"
35 // 2: Source -> Dest : send "start command"
36 // 3: Dest -> Source : sends "ok response" when read to accept state data
37 // 4: Source -> Dest : sends "config command" followed by config data, length
39 // 5: Dest -> Source : sends "ok response" when ready to accept memory data
40 // 6: Source -> Dest : send "memory fd command" followed by u16 slot ID and FD for memory
41 // 7: Dest -> Source : sends "ok response" when received
42 // 8..(n-4): Repeat steps 6 and 7 until source has no more memory to send
43 // (n-3): Source -> Dest : sends "state command" followed by state data, length
45 // (n-2): Dest -> Source : sends "ok response"
46 // (n-1): Source -> Dest : send "complete command"
47 // n: Dest -> Source: sends "ok response"
49 // The destination can at any time send an "error response" to cancel
50 // The source can at any time send an "abandon request" to cancel
66 fn default() -> Self { in default()
83 pub fn new(command: Command, length: u64) -> Self { in new()
91 pub fn start() -> Self { in start()
95 pub fn state(length: u64) -> Self { in state()
99 pub fn config(length: u64) -> Self { in config()
103 pub fn memory(length: u64) -> Self { in memory()
107 pub fn memory_fd(length: u64) -> Self { in memory_fd()
111 pub fn complete() -> Self { in complete()
115 pub fn abandon() -> Self { in abandon()
119 pub fn command(&self) -> Command { in command()
123 pub fn length(&self) -> u64 { in length()
127 pub fn read_from(fd: &mut dyn Read) -> Result<Request, MigratableError> { in read_from()
135 pub fn write_to(&self, fd: &mut dyn Write) -> Result<(), MigratableError> { in write_to()
150 fn default() -> Self { in default()
167 pub fn new(status: Status, length: u64) -> Self { in new()
175 pub fn ok() -> Self { in ok()
179 pub fn error() -> Self { in error()
183 pub fn status(&self) -> Status { in status()
187 pub fn read_from(fd: &mut dyn Read) -> Result<Response, MigratableError> { in read_from()
199 ) -> Result<Response, MigratableError> in ok_or_abandon()
211 pub fn write_to(&self, fd: &mut dyn Write) -> Result<(), MigratableError> { in write_to()
230 pub fn from_bitmap(bitmap: Vec<u64>, start_addr: u64, page_size: u64) -> Self { in from_bitmap()
258 pub fn regions(&self) -> &[MemoryRange] { in regions()
266 pub fn read_from(fd: &mut dyn Read, length: u64) -> Result<MemoryRangeTable, MigratableError> { in read_from()
286 pub fn length(&self) -> u64 { in length()
290 pub fn write_to(&self, fd: &mut dyn Write) -> Result<(), MigratableError> { in write_to()
298 pub fn is_empty(&self) -> bool { in is_empty()
306 pub fn new_from_tables(tables: Vec<Self>) -> Self { in new_from_tables()