Skip to content

virt_mshv: Wire up SignalMsi implementation#3038

Merged
jstarks merged 2 commits intomicrosoft:mainfrom
sprt:virt-mshv-signal-msi
Mar 18, 2026
Merged

virt_mshv: Wire up SignalMsi implementation#3038
jstarks merged 2 commits intomicrosoft:mainfrom
sprt:virt-mshv-signal-msi

Conversation

@sprt
Copy link
Contributor

@sprt sprt commented Mar 18, 2026

The MSHV backend did not override as_signal_msi(), so the default returned None and left PCIe MSI connections wired to a disconnected target that silently dropped all interrupts. This caused PCIe devices to hang after probe (see below). Fixed this by implementing SignalMsi for MshvPartitionInner, delegating to the existing request_msi().

virtio_blk virtio0: 1/0/0 default/read/poll queues
virtio_blk virtio0: [vda] 368640 512-byte logical blocks (189 MB/180 MiB)
WARN pci_core::msi:  dropped MSI interrupt to disconnected target
WARN pci_core::msi:  dropped MSI interrupt to disconnected target

Co-authored-by: GitHub Copilot

Co-authored-by: GitHub Copilot
Signed-off-by: Aurélien Bombo <abombo@microsoft.com>
@github-actions github-actions bot added the unsafe Related to unsafe code label Mar 18, 2026
@github-actions
Copy link

⚠️ Unsafe Code Detected

This PR modifies files containing unsafe Rust code. Extra scrutiny is required during review.

For more on why we check whole files, instead of just diffs, check out the Rustonomicon

@sprt sprt force-pushed the virt-mshv-signal-msi branch from c4120ee to dc835f0 Compare March 18, 2026 01:00
@sprt sprt marked this pull request as ready for review March 18, 2026 01:01
@sprt sprt requested review from a team as code owners March 18, 2026 01:01
Copilot AI review requested due to automatic review settings March 18, 2026 01:01
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes MSI interrupt delivery for the MSHV backend by wiring up the SignalMsi interface, so PCIe devices no longer connect to a disconnected MSI target that drops interrupts.

Changes:

  • Implement virt::Partition::as_signal_msi() for MshvPartition to return an MSI signaling target.
  • Implement pci_core::msi::SignalMsi for MshvPartitionInner, delegating to the existing request_msi() path.
  • Add the pci_core workspace dependency to virt_mshv.

Reviewed changes

Copilot reviewed 2 out of 3 changed files in this pull request and generated no comments.

File Description
vmm_core/virt_mshv/src/lib.rs Exposes an MSI signaling target for MSHV and implements SignalMsi by forwarding to request_msi().
vmm_core/virt_mshv/Cargo.toml Adds pci_core dependency needed for the SignalMsi trait.
Cargo.lock Lockfile update reflecting the new pci_core dependency.

You can also share your feedback on Copilot code review. Take the survey.

Signed-off-by: abombo@microsoft.com <abombo@microsoft.com>
@github-actions
Copy link

@jstarks jstarks merged commit a821e8f into microsoft:main Mar 18, 2026
79 of 82 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

unsafe Related to unsafe code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants