pub enum Command<'a> {
Yield,
Block,
Shutdown(ShutdownReason),
Poll {
ports: &'a mut [evtchn_port_t],
timeout: u64,
},
RemoteShutdown {
domain_id: u16,
reason: ShutdownReason,
},
ShutdownCode(ShutdownReason),
Watchdog {
id: u32,
timeout: u32,
},
PinOverride {
pcpu: i32,
},
}
Expand description
Scheduling command
Variants
Yield
Yield remaining of domain’s quantum
Block
Deschedule domain until event is received
Shutdown(ShutdownReason)
“Halt execution of this domain (all VCPUs) and notify the system controller. @arg == pointer to sched_shutdown_t structure.
If the sched_shutdown_t reason is SHUTDOWN_suspend then x86 PV guests must also set RDX (EDX for 32-bit guests) to the MFN of the guest’s start info page. RDX/EDX is the third hypercall argument.
In addition, which reason is SHUTDOWN_suspend this hypercall returns 1 if suspend was cancelled or the domain was merely checkpointed, and 0 if it is resuming in a new domain.“
Poll
Fields
ports: &'a mut [evtchn_port_t]
Event-channel ports
“Poll a set of event-channel ports. Return when one or more are pending”
RemoteShutdown
“Declare a shutdown for another domain. The main use of this function is in interpreting shutdown requests and reasons for fully-virtualized domains. A para-virtualized domain may use SCHEDOP_shutdown directly.”
ShutdownCode(ShutdownReason)
“Latch a shutdown code, so that when the domain later shuts down it reports this code to the control tools”
Watchdog
“Setup, poke and destroy a domain watchdog timer. @arg == pointer to sched_watchdog_t structure. With id == 0, setup a domain watchdog timer to cause domain shutdown after timeout, returns watchdog id. With id != 0 and timeout == 0, destroy domain watchdog timer. With id != 0 and timeout != 0, poke watchdog timer and set new timeout.”
PinOverride
“Override the current vcpu affinity by pinning it to one physical cpu or undo this override restoring the previous affinity. @arg == pointer to sched_pin_override_t structure.
A negative pcpu value will undo a previous pin override and restore the previous cpu affinity. This call is allowed for the hardware domain only and requires the cpu to be part of the domain’s cpupool.“
Auto Trait Implementations
impl<'a> RefUnwindSafe for Command<'a>
impl<'a> Send for Command<'a>
impl<'a> Sync for Command<'a>
impl<'a> Unpin for Command<'a>
impl<'a> !UnwindSafe for Command<'a>
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstablefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more