Struct swap::processes::ProcessesGuard
source · pub struct ProcessesGuard {
pids: Vec<Pid>,
}
Expand description
Stops all the crosvm device processes during moving the guest memory to the staging memory.
While moving, we must guarantee that no one changes the guest memory contents. This supports devices in sandbox mode only.
We stop all the crosvm processes instead of the alternatives.
- Just stop vCPUs
- devices still may works in the child process and write something to the guest memory.
- Use write protection of userfaultfd
- UFFDIO_REGISTER_MODE_WP for shmem is WIP and not supported yet.
devices::Suspendable::sleep()
Suspendable
is not supported by all devices yet.
Fields§
§pids: Vec<Pid>
Implementations§
source§impl ProcessesGuard
impl ProcessesGuard
sourcefn stop_the_world(&self) -> Result<()>
fn stop_the_world(&self) -> Result<()>
Stops all the crosvm processes by sending SIGSTOP signal.
sourcefn continue_the_world(&self)
fn continue_the_world(&self)
Resumes all the crosvm processes by sending SIGCONT signal.
Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for ProcessesGuard
impl Send for ProcessesGuard
impl Sync for ProcessesGuard
impl Unpin for ProcessesGuard
impl UnwindSafe for ProcessesGuard
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more