Conversation
|
Caution Review failedPull request was closed or merged during review 📝 WalkthroughWalkthroughThis PR replaces the monolithic ChangesVirtio Transport Refactor
Sequence Diagram(s)sequenceDiagram
participant Builder as DeviceManagerBuilder
participant Device as VirtioDevice (blk/entropy/balloon)
participant Common as VirtioTransportCommon
participant Transport as VirtioMmioTransport / VirtioPciTransport
participant Worker as virtqueue_worker (tokio task)
participant IrqChip as InterruptController
Builder->>Device: new(memory)
Builder->>Device: into_mmio_device(irq_alloc, mmio_alloc, runtime, irq_chip)
Device->>Common: VirtioTransportCommon::new(device)
Device->>Transport: VirtioMmioTransport::new(runtime, memory, irq_chip, index, range, irq, common)
note over Transport: or VirtioPciTransport::new(...)
Builder->>Transport: register with device manager
Note over Transport: Guest writes QueueReady=1
Transport->>Common: write_reg(QueueReady, 1)
Common->>Worker: tokio::spawn(virtqueue_worker(controller, notifier, virtqueue))
Note over Worker: Guest posts buffer to avail ring
Worker->>Worker: queue_notify.notified().await
Worker->>Device: handle_desc(desc_ring, desc_id)
Worker->>IrqChip: notify_used_buffer() → trigger_irq / send_msi
Estimated code review effort🎯 5 (Critical) | ⏱️ ~120 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary by CodeRabbit
New Features
Refactor
Chores