Skip to content

fix virtio console reactivation after reset - #120

Open
jonaswre wants to merge 6 commits into
superradcompany:krunfrom
jonaswre:fix/console-reset-reactivation
Open

fix virtio console reactivation after reset#120
jonaswre wants to merge 6 commits into
superradcompany:krunfrom
jonaswre:fix/console-reset-reactivation

Conversation

@jonaswre

Copy link
Copy Markdown

Problem

The virtio-console backend treats activation as one-shot and leaves ports marked active after shutdown. After a valid virtio reset, a second guest activation is not handled and the port worker threads are not restarted. This breaks Linux hibernation/resume and any other device reset lifecycle.

Fix

  • Keep the console activation event registered across reset cycles.
  • Transition a shut-down port to Inactive before joining its workers so the next PORT_OPEN restarts them.
  • Add regression coverage for both reset invariants.

Validation

  • cargo test -p msb_krun_devices --lib (79 passed)
  • Live Microsandbox Linux hibernation restore using this commit: restore 2.18s; first exec 0.03s; runtime virtio-fs share and heartbeat restored.
  • cargo clippy -p msb_krun_devices --lib --tests -- -D warnings was attempted but is blocked by 14 pre-existing warnings in unrelated legacy/descriptor tests under Rust 1.97.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant