Skip to content

virtio: Add support for virtio packed descriptor queues and make them the default.#2943

Open
Brian-Perkins wants to merge 5 commits intomicrosoft:mainfrom
Brian-Perkins:virtio_packed
Open

virtio: Add support for virtio packed descriptor queues and make them the default.#2943
Brian-Perkins wants to merge 5 commits intomicrosoft:mainfrom
Brian-Perkins:virtio_packed

Conversation

@Brian-Perkins
Copy link
Contributor

No description provided.

Copilot AI review requested due to automatic review settings March 11, 2026 15:22
@Brian-Perkins Brian-Perkins requested a review from a team as a code owner March 11, 2026 15:22
@github-actions github-actions bot added the unsafe Related to unsafe code label Mar 11, 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

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 adds virtio packed descriptor queue support to the virtio core queue implementation, advertises packed queues by default in PCI/MMIO transports, and expands the virtio test suite to validate both split and packed queue behavior.

Changes:

  • Advertise VIRTIO_F_RING_PACKED by default for virtio PCI/MMIO devices (while retaining split queues as fallback when not negotiated).
  • Refactor split-queue logic into its own module and introduce a new packed-queue implementation.
  • Update/extend unit tests to exercise both split and packed queue paths and adjust expected feature bits.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 8 comments.

Show a summary per file
File Description
vm/devices/virtio/virtio/src/transport/pci.rs Advertises packed ring feature (ring_packed) by default for PCI transport.
vm/devices/virtio/virtio/src/transport/mmio.rs Advertises packed ring feature (ring_packed) by default for MMIO transport.
vm/devices/virtio/virtio/src/tests.rs Updates feature expectations and adds coverage for packed queues alongside split queues.
vm/devices/virtio/virtio/src/spec.rs Extends queue spec types for packed descriptors/event suppression.
vm/devices/virtio/virtio/src/queue.rs Selects split vs packed queue implementation based on negotiated features; refactors split logic out.
vm/devices/virtio/virtio/src/queue/split.rs New module containing the split queue get/complete logic previously in queue.rs.
vm/devices/virtio/virtio/src/queue/packed.rs New packed queue get/complete implementation.

@github-actions
Copy link

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

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


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

Copy link
Member

@jstarks jstarks left a comment

Choose a reason for hiding this comment

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

Minor suggestion on the descriptor chain walk — see inline comment.

Copilot AI review requested due to automatic review settings March 11, 2026 22:45
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

Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.

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