Skip to content

trait Pause for device pause and resume#389

Merged
Lencerf merged 5 commits intogoogle:mainfrom
Lencerf:feat/device-pause-resume
Feb 5, 2026
Merged

trait Pause for device pause and resume#389
Lencerf merged 5 commits intogoogle:mainfrom
Lencerf:feat/device-pause-resume

Conversation

@Lencerf
Copy link
Collaborator

@Lencerf Lencerf commented Feb 5, 2026

No description provided.

Replace the `MmioRange` type alias with `Arc<dyn Mmio>` to improve code
clarity by making type signatures more explicit.

Signed-off-by: Changyuan Lyu <changyuanl@google.com>
Move the `PvPanic` device from the `device` module to the `pci` module
to resolve a circular dependency.

Signed-off-by: Changyuan Lyu <changyuanl@google.com>
Create the `MmioDev` trait as an abstraction for MMIO devices,
inheriting from the `Mmio` trait.

Signed-off-by: Changyuan Lyu <changyuanl@google.com>
@coveralls
Copy link

coveralls commented Feb 5, 2026

Pull Request Test Coverage Report for Build 21704213175

Details

  • 5 of 64 (7.81%) changed or added relevant lines in 11 files are covered.
  • 1 unchanged line in 1 file lost coverage.
  • Overall coverage decreased (-0.07%) to 26.302%

Changes Missing Coverage Covered Lines Changed/Added Lines %
alioth/src/board/board.rs 0 1 0.0%
alioth/src/vm/vm.rs 0 4 0.0%
alioth/src/mem/mem.rs 5 10 50.0%
alioth/src/device/fw_cfg/fw_cfg.rs 0 6 0.0%
alioth/src/device/pl011.rs 0 6 0.0%
alioth/src/device/pl031.rs 0 6 0.0%
alioth/src/device/serial.rs 0 6 0.0%
alioth/src/pci/host_bridge.rs 0 6 0.0%
alioth/src/pci/pvpanic.rs 0 6 0.0%
alioth/src/pci/segment.rs 0 6 0.0%
Files with Coverage Reduction New Missed Lines %
alioth/src/vm/vm.rs 1 0.0%
Totals Coverage Status
Change from base Build 21685297704: -0.07%
Covered Lines: 3607
Relevant Lines: 14199

💛 - Coveralls

Define a common interface for pausing and resuming devices.

Provide a default implementation that returns a `NotPausable` error and
implement the trait for all MMIO devices.

Signed-off-by: Changyuan Lyu <changyuanl@google.com>
Require the `Pci` trait to implement the `Pause` trait.

Signed-off-by: Changyuan Lyu <changyuanl@google.com>
@Lencerf Lencerf force-pushed the feat/device-pause-resume branch from 304f305 to 93a0292 Compare February 5, 2026 08:22
@Lencerf Lencerf merged commit c998857 into google:main Feb 5, 2026
5 checks passed
@Lencerf Lencerf deleted the feat/device-pause-resume branch February 5, 2026 08:31
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.

2 participants