virtio: Add support for virtio packed descriptor queues and make them the default.#2943
virtio: Add support for virtio packed descriptor queues and make them the default.#2943Brian-Perkins wants to merge 5 commits intomicrosoft:mainfrom
Conversation
|
This PR modifies files containing For more on why we check whole files, instead of just diffs, check out the Rustonomicon |
There was a problem hiding this comment.
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_PACKEDby 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. |
e726683 to
53393ff
Compare
There was a problem hiding this comment.
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.
jstarks
left a comment
There was a problem hiding this comment.
Minor suggestion on the descriptor chain walk — see inline comment.
No description provided.