mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
vmm: Add postcopy support to receive-migration
Plumb the SocketUffdMemorySource into the receiving side of live migration. When memory_mode=postcopy is requested, the destination brings up a dedicated fault connection, registers userfaultfd on the restored memory regions, and serves guest pages on demand over that connection while the VM resumes early. Signed-off-by: Sebastien Boeuf <sboeuf@meta.com> Assisted-by: Claude:claude-opus-4-7
This commit is contained in:
@@ -278,15 +278,12 @@ impl UffdMemorySource for FileUffdMemorySource {
|
||||
}
|
||||
|
||||
/// Memory source that provides pages content over a socket.
|
||||
// Wired into the receive-migration path in the next commit.
|
||||
#[allow(dead_code)]
|
||||
pub(crate) struct SocketUffdMemorySource {
|
||||
stream: SocketStream,
|
||||
shared_backing: bool,
|
||||
buf: Vec<u8>,
|
||||
}
|
||||
|
||||
#[allow(dead_code)]
|
||||
impl SocketUffdMemorySource {
|
||||
pub fn new(stream: SocketStream, shared_backing: bool) -> Self {
|
||||
Self {
|
||||
|
||||
Reference in New Issue
Block a user