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

timeout: u64

Nanoseconds since UNIX epoch that if reached while blocked on an event will result in a non-zero return value of the hypercall

“Poll a set of event-channel ports. Return when one or more are pending”

RemoteShutdown

Fields

domain_id: u16

Remote domain ID

reason: ShutdownReason

Reason for shutdown

“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

Fields

id: u32

ID of watchdog timer

timeout: u32

Timeout

“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

Fields

pcpu: i32

Physical CPU ID to pin to

“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

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of [From]<T> for U chooses to do.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.