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 emitted the definitive
SchedulerAttached lifecycle frame. The guest emits that frame at the
one site where the scheduler child is alive and sched_ext reached
enabled. In particular, PayloadStarting is not attach evidence:
Phase 5 emits it for schedulerless runs too. Treating it as evidence
lets a schedulerless verifier workload running under the kernel’s
fallback policy false-PASS.
On attach failure the guest emits SchedulerDied /
SchedulerNotAttached; a guest that vanishes without any conclusive
frame — e.g. a kernel panic which reboots via panic=-1 — is
AttachOutcome::Unconfirmed, also a FAIL. 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 emitted SchedulerAttached 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 SchedulerAttached frame: attach was never
positively confirmed. This includes an early guest kernel panic
and a schedulerless run which proceeds to PayloadStarting.
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