Repository navigation
feat(block): add modern PCI VirtIO-Block driver - #42
Merged
Merged
Conversation
Support built-in and native module operation with standard block names, capacity ioctls, cache flushes, and logical block sizes up to 4 KiB. Integrate GPT/MBR discovery and ext4 I/O and add protocol and geometry coverage.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
问题与效果
ReliefNT 可识别现代 PCI VirtIO-Block 磁盘,并向用户态提供
/dev/vd*和常规 Linux 块设备接口。驱动默认内置,也可以编译成virtio_blk.ko。流程与实现
验证
make kernel、CONFIG_VIRTIO_BLK=m的make install均通过;确认产出了.ko。mksquashfs不在 PATH 首次未运行;加入现有工具后单独重跑通过,其余 16 项首次通过。此前全量宿主测试发现的block_inventory、block_exclusive、linux_inventory链接失败在未改内核基线也有复现,未纳入本次改动。VBLK_BUILTIN_DONE:0);UEFI 模块版从 initramfs 加载驱动、按卷标挂载 4Kn ext4 根并进入/sbin/init(VBLK_ROOT_DONE:0)。关机后读取镜像确认同步写入持久化,且非对齐写入未破坏相邻字节。兼容性与限制
旧式寄存器专用设备、VirtIO MMIO/SCSI、VMware PVSCSI 不在本 PR 范围。暂不支持 VirtIO-Block swap、热插拔/在线扩容、多队列、discard/TRIM 或 write-zeroes。未跑完整安装及移除 ISO 后从磁盘独立引导。VMware 验证未完成。