Fix halting behavior preventing humility probe from working - #725
Merged
Conversation
This makes it possible for code calling `halt`/`run` to keep state consistent.
evan-oxide
approved these changes
Aug 19, 2026
evan-oxide
left a comment
Contributor
There was a problem hiding this comment.
LGTM, sorry about that
Changes in humility#711 can result in the CPU unexpectedly running again after a `validate` call. Only make the CPU run if the CPU was previously running.
labbott
force-pushed
the
correct_halting
branch
from
August 20, 2026 15:33
6483702 to
35e7781
Compare
jamesmunns
reviewed
Aug 20, 2026
| use thiserror::Error; | ||
|
|
||
| /// State of the CPU before the halt/run operation | ||
| pub enum PreviousCpuState { |
Contributor
There was a problem hiding this comment.
Should we mark this #[must_use] to catch places where we don't check this but should?
Contributor
Author
There was a problem hiding this comment.
I tried this and I think it causes more problems than it's solving. Most other places in the code are very deliberate about wanting halt/run so the logic seems to result in let _ = core.run()?. Maybe this is a sign we need a fn run_while_halted(&self, fn ...) for parts of the code? That also seems like follow up work.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
@adamlouis flagged this in a facade change that we were getting errors from
humility probe"The core has to be halted for the operation, but was not." . This introduces two change: a way to get the previous CPU state fromrunandhaltand a fix invalidate