⚠️ VeridianOS Kernel Documentation - This is low-level kernel code. All functions are unsafe unless explicitly marked otherwise. no_std

MigrationController

Struct MigrationController 

Source
pub struct MigrationController { /* private fields */ }
Expand description

Live migration controller

Implementations§

Source§

impl MigrationController

Source

pub fn new(source_vm_id: u64) -> Self

Source

pub fn begin_setup(&mut self, total_memory_pages: u64) -> Result<(), VmError>

Begin migration setup

Source

pub fn begin_precopy(&mut self) -> Result<(), VmError>

Transition to pre-copy phase

Source

pub fn precopy_iteration(&mut self) -> Result<Vec<u64>, VmError>

Perform one pre-copy iteration: returns list of dirty page indices to send

Source

pub fn begin_stop_and_copy(&mut self) -> Result<(), VmError>

Begin stop-and-copy phase (VM must be paused)

Source

pub fn serialize_vmcs(&mut self, fields: &[(u32, u64)]) -> Result<(), VmError>

Serialize VMCS state for transfer

Source

pub fn final_dirty_pages(&self) -> Result<Vec<u64>, VmError>

Get remaining dirty pages for stop-and-copy final transfer

Source

pub fn complete(&mut self) -> Result<(), VmError>

Complete the migration

Source

pub fn fail(&mut self)

Mark migration as failed

Source

pub fn state(&self) -> MigrationState

Source

pub fn progress(&self) -> &MigrationProgress

Source

pub fn source_vm_id(&self) -> u64

Source

pub fn vmcs_state(&self) -> Option<&SerializedVmcs>

Auto Trait Implementations§

§

impl Freeze for MigrationController

§

impl RefUnwindSafe for MigrationController

§

impl Send for MigrationController

§

impl Sync for MigrationController

§

impl Unpin for MigrationController

§

impl UnwindSafe for MigrationController

Blanket Implementations§

§

impl<T> Any for T
where T: 'static + ?Sized,

§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<T> Borrow<T> for T
where T: ?Sized,

§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
§

impl<T> BorrowMut<T> for T
where T: ?Sized,

§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> From<T> for T

§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T, U> Into<U> for T
where U: From<T>,

§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of [From]<T> for U chooses to do.

§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.