pub enum AttachOutcome {
Attached,
Died,
NotAttached(String),
Unconfirmed,
}Expand description
Whether the scheduler positively confirmed it turned on during a verifier VM run.
The guest init’s attach gate (poll_startup + poll_scx_attached
in crate::vmm::rust_init::scheduler) already runs on every verifier
VM boot: it confirms the scheduler process survived BPF load AND that
/sys/kernel/sched_ext/state reached enabled. The kernel sets
enabled only after ops.init, per-task init, and switching
eligible tasks to the sched_ext class (kernel/sched/ext.c
scx_root_enable_workfn), so enabled proves the scheduler turned
on and is scheduling — not merely that its BPF loaded.
The verdict is POSITIVE-confirmation, not absence-of-failure: a
verifier cell PASSes only when the guest reached its post-attach
dispatch phase — a PayloadStarting lifecycle frame, emitted at
ktstr_guest_init Phase 5, which is reached ONLY if start_scheduler
succeeded in Phase 3. On attach failure the guest emits
SchedulerDied / SchedulerNotAttached and force-reboots in Phase 3
BEFORE Phase 5, so no PayloadStarting arrives. A guest that vanishes
before Phase 5 with NO frame at all — e.g. a kernel panic, which
reboots via the guest’s panic=-1 (an i8042 reset →
ExitAction::Shutdown, NOT a host watchdog timeout) — is
AttachOutcome::Unconfirmed, also a FAIL. Absence-of-failure alone
would false-PASS that vanish case. collect_verifier_output
consumes this verdict instead of discarding it. Scheduler-agnostic
(kernel sysfs state), so it holds for every declared scheduler.
Variants§
Attached
The guest reached its post-attach dispatch phase (a
PayloadStarting frame) with no failure frame: the scheduler
loaded, stayed alive, and reached sched_ext enabled.
Died
Scheduler process exited during BPF load / startup
(LifecyclePhase::SchedulerDied).
NotAttached(String)
Scheduler stayed alive but never reached enabled
(LifecyclePhase::SchedulerNotAttached); carries the guest’s
reason suffix when present.
Unconfirmed
No failure frame AND no PayloadStarting frame: the guest never
reached the post-attach dispatch phase, so attach was never
positively confirmed (e.g. an early guest kernel panic that
reboots via panic=-1 before Phase 3 — emitting no lifecycle
frame and NOT tripping the host watchdog).
Implementations§
Source§impl AttachOutcome
impl AttachOutcome
Sourcepub fn failure_reason(&self) -> Option<String>
pub fn failure_reason(&self) -> Option<String>
Human-readable failure reason, or None when attached.
Trait Implementations§
Source§impl Clone for AttachOutcome
impl Clone for AttachOutcome
Source§fn clone(&self) -> AttachOutcome
fn clone(&self) -> AttachOutcome
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for AttachOutcome
impl Debug for AttachOutcome
Source§impl PartialEq for AttachOutcome
impl PartialEq for AttachOutcome
impl Eq for AttachOutcome
impl StructuralPartialEq for AttachOutcome
Auto Trait Implementations§
impl Freeze for AttachOutcome
impl RefUnwindSafe for AttachOutcome
impl Send for AttachOutcome
impl Sync for AttachOutcome
impl Unpin for AttachOutcome
impl UnwindSafe for AttachOutcome
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more