Skip to content

virtio: avoid spurious config change interrupt on DRIVER_OK - #4226

Merged
Steven Malis (smalis-msft) merged 3 commits into
microsoft:mainfrom
bharqav:fix/virtio-pci-spurious-config-interrupt
Aug 17, 2026
Merged

virtio: avoid spurious config change interrupt on DRIVER_OK#4226
Steven Malis (smalis-msft) merged 3 commits into
microsoft:mainfrom
bharqav:fix/virtio-pci-spurious-config-interrupt

Conversation

@bharqav

@bharqav Bhargav (bharqav) commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

Summary

Fixes Issue #4049 - "virtio-pci: spurious configuration-change interrupt (ISR bit 1) raised at DRIVER_OK"

The VirtIO transport currently updates config_generation when the
device reaches DRIVER_OK.

The DRIVER_OK transition does not represent a change to the
device-specific configuration space. However, updating the generation
during this transition also causes a configuration-change interrupt to
be signaled during device initialization.

This change removes that spurious update and adds regression coverage
for MMIO and PCI transports.

Changes

  • Remove update_config_generation() from the DRIVER_OK completion path.
  • Preserve the existing FEATURES_OK config-generation update.
  • Update initialization expectations to reflect the correct generation.
  • Verify that DRIVER_OK does not generate a configuration-change
    interrupt for MMIO.
  • Verify that DRIVER_OK does not generate a configuration-change
    interrupt for PCI.
  • Remove existing test expectations that depended on the spurious
    initialization interrupt.

Testing

  • cargo fmt --check -p virtio — passed
  • git diff --check — passed
  • cargo test -p virtio — unable to execute locally because the
    Windows SDK required by the MSVC toolchain is unavailable
    (kernel32.lib).

CI validation is therefore required for the full test suite.

@bharqav
Bhargav (bharqav) requested a review from a team as a code owner August 13, 2026 08:50
@github-actions github-actions Bot added the unsafe Related to unsafe code label Aug 13, 2026
@github-actions

Copy link
Copy Markdown

⚠️ 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

@bharqav

Copy link
Copy Markdown
Contributor Author

@microsoft-github-policy-service agree

@github-actions

Copy link
Copy Markdown

@smalis-msft

Copy link
Copy Markdown
Contributor

Thanks for your submission, someone will take a look soon! Don't worry about any SNP test failures, they're having some issues right now.

@github-actions

Copy link
Copy Markdown

@smalis-msft
Steven Malis (smalis-msft) merged commit 62b9ca5 into microsoft:main Aug 17, 2026
100 of 104 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.

3 participants