Skip to main content

PartitionTimeControl

Trait PartitionTimeControl 

Source
pub trait PartitionTimeControl {
    // Required methods
    fn freeze_time(&self);
    fn thaw_time(&self);
}
Expand description

Controls the passage of partition time independently of VP execution.

This controls backend time, not the software device clock in [vmcore::vmtime]. Stopping VPs alone does not freeze time. A full VM stop must freeze time after stopping all VPs, and resume must thaw time before running any VP. Temporary VP stops need not freeze time.

State access while frozen must observe frozen time, and restoring time must not thaw it. Implementations may provide this behavior in software. These transitions are infallible lifecycle operations; a backend must treat an unexpected failure as fatal rather than return with unknown time state.

Required Methods§

Source

fn freeze_time(&self)

Freezes partition time until Self::thaw_time is called.

The caller must ensure that all VPs are stopped. Violating this precondition has backend-specific behavior; implementations need not check it. This is a no-op if time is already frozen.

Source

fn thaw_time(&self)

Resumes partition time, including any time state replaced by reset or VTL scrub.

The caller must ensure that all VPs are stopped. Violating this precondition has backend-specific behavior; implementations need not check it. This is a no-op for time that is already running.

Implementors§