pub struct Halt { /* private fields */ }
Expand description
Tracks whether the VP should halt due to a guest-initiated condition (triple fault, etc.).
Implementations§
Source§impl Halt
impl Halt
Sourcepub fn new() -> (Self, HaltReasonReceiver)
pub fn new() -> (Self, HaltReasonReceiver)
Returns a new halt object, plus a receiver to asynchronously receive the reason for a halt.
Sourcepub fn halt(&self, reason: HaltReason)
pub fn halt(&self, reason: HaltReason)
Halts all VPs and sends the halt reason to the receiver returned by
Self::new()
.
After this returns, it’s guaranteed that any VPs that try to run again will instead halt. So if this is called from a VP thread, it will ensure that that VP will not resume.
Sourcepub fn replay_mtrrs(&self)
pub fn replay_mtrrs(&self)
Halts all VPs temporarily, resets their variable MTRRs to their initial state, then resumes the VPs.
This is used by the legacy BIOS, since it stomps over the variable MTRRs in undesirable ways and is difficult to fix.
Trait Implementations§
Source§impl DebugEventHandler for Halt
impl DebugEventHandler for Halt
Source§fn on_debug_break(&self, vp: Option<u32>)
fn on_debug_break(&self, vp: Option<u32>)
Called when a device has requested a debug break.
Source§impl PowerEventHandler for Halt
impl PowerEventHandler for Halt
Source§fn on_power_event(&self, evt: PowerEvent)
fn on_power_event(&self, evt: PowerEvent)
Called when there is a device-triggered power event.
Auto Trait Implementations§
impl !Freeze for Halt
impl !RefUnwindSafe for Halt
impl Send for Halt
impl Sync for Halt
impl Unpin for Halt
impl !UnwindSafe for Halt
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