Repository navigation
fix(hvf,hostd): guest PC wrap, vCPU-panic unwind guard, HTTP flow cancellation through response framing (#4839) - #5402
Merged
Merged
Conversation
… watch cancellation through response framing (#4839)
5 of 11 tasks
auser
marked this pull request as ready for review
November 13, 2026 01:56
auser
enabled auto-merge
November 13, 2026 01:57
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.
Part of the lifecycle review under #4839 (companion: #5390).
pc + 4on a guest-chosen PC (data-abort skip and the non-HVC exception path) trapped on overflow, so guest code could panic the vCPU thread.next_pcnow wraps.MachineShared::end, sothread::scopejoined parked secondaries forever. A genericOnDropguard (in smp.rs, so kernel_boot.rs stays under its size ceiling) ends the machine on unwind.run_until_canceled.Tests, each run against a broken version of its fix and then against the fix (unchanged):
next_pc_wraps_at_the_top_of_the_address_spacepc + 4overflow panic)a_panic_while_a_cpu_is_parked_still_releases_ita_reset_while_the_response_is_still_streaming_stops_the_forwardThe HTTP test exercises the helper, not the whole
spawn_forwardpath (that needs a live substitution service); its broken variant is a stand-in for the old shape.Footprint
The tests put the tree 63 SLOC over the ceiling (966163 merged with origin/main at 813a71c). To fit, this PR deletes functions with no reference anywhere in the repo (every symbol below occurs exactly once across
.rs,.md,.toml,.featureand scripts, excluding target and third_party; none is cfg-gated, FFI, serde-visible, a claim witness, or named in xtask). Result: 966163 -> 966083 (ceiling 966100).Deleted:
mvm_build::runtime_layer::stage_runtime_layer,compose_runtime_layers: no callers.stage_tarstays, now#[cfg(test)], because its tar-refusal tests are kept.mvm_agentd::trusted_env::configure_explicit_command: no callers.mvm_agentd::builder_session::serve_build(plus the imports it alone used): no callers; the session wire types are untouched.mvm_vmmEgressGate::decide_addr: no callers (decide_addr_for_protostays).mvm_clientOfflineRevocationPolicy::load_from_host: no callers.libkrun_sysKrunContext::shutdown_eventfd: no callers.mvm_hostdwith_artifact_collector: no callers.mvm_core::spawn_scopewith_creation_timeout(test-support only): no callers.These are
pubitems of workspace crates; a consumer outside this repository (for example mvmd) would break, and I could not check that.Validation
On a tree merged with origin/main: fmt clean;
just check::gatedpasses (Linux target and the bdd conformance check); clippy-D warnings --all-targetson the whole workspace clean; nextest of mvm-hostd, mvm-runtime, mvm-build, mvm-agentd, mvm-vmm, mvm-client, mvm-core and libkrun-sys 12145/12145; check-file-size, check-claim-catalog, check-witness-citations and check-rust-footprint (966083) pass. Not run: live HVF guests.Refs #4839 (the umbrella stays open; this PR does not close it).