Skip to content

Accept transitional VirtIO PCI devices

千年游戏开发部 requested to merge fix/virtio-blk-transitional into main

QEMU 11's default virtio-blk-pci is a transitional device (1af4:1001, subsystem 0002) that exposes the full modern capability set on BAR4. Three ID gates rejected it: the devmgr PCI identity match, the config-space device ID check, and the kernel DMA trust list in arch/src/device/dma.rs, so block devices could not register and runtime tests hung at mount. Transitional devices are now accepted alongside modern ones and driven through the modern interface; the subsystem device ID distinguishes them from unrelated devices reusing a legacy ID. Legacy-only devices without modern capability regions return Unsupported. Validation (QEMU 11.1, real devices):

riscv64 + loongarch64: bare -device virtio-blk-pci driven end to end (probe, DMA, negotiation, queued I/O with interrupts, cancellation, sessions) riscv64 bare -device virtio-rng-pci: full RNG suite passes disable-legacy=on control unchanged; legacy-only (disable-modern=on) rejected Host checks: fmt, clippy, workspace tests, package-linux-test on both targets.

Merge request reports