Struct devices::virtio::pvclock::PvClockState
source · struct PvClockState {
tsc_frequency: u64,
paused_main_worker: Option<PvClockWorkerSnapshot>,
total_suspend_ns: Arc<AtomicU64>,
features: u64,
acked_features: u64,
}
Expand description
Serializable part of the PvClock struct which will be used by the virtio_snapshot / restore.
Fields§
§tsc_frequency: u64
§paused_main_worker: Option<PvClockWorkerSnapshot>
If the device is sleeping, a PvClockWorkerSnapshot that can re-create the worker will be stored here. (We can’t just store the worker itself as it contains an object tree with references to GuestMemory.)
total_suspend_ns: Arc<AtomicU64>
The total time the vm has been suspended, this is in an Arc<AtomicU64>>
because it’s set
by the PvClockWorker thread but read by PvClock from the mmio bus in the main thread.
features: u64
§acked_features: u64
Trait Implementations§
source§impl<'de> Deserialize<'de> for PvClockState
impl<'de> Deserialize<'de> for PvClockState
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl RefUnwindSafe for PvClockState
impl Send for PvClockState
impl Sync for PvClockState
impl Unpin for PvClockState
impl UnwindSafe for PvClockState
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
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.