-
Notifications
You must be signed in to change notification settings - Fork 52
Description
核心仓库地址:https://github.com/DINGBROK423/AxVirtio-blk/tree/p1
子仓库:按依赖顺序排序
axvmconfig: https://github.com/DINGBROK423/axvmconfig/tree/merge_add_virtio_mmio (已提交pr -> next分支)
axdevice: https://github.com/DINGBROK423/axdevice/tree/virt-blk (依赖axvmconfig,AxVirtio-blk 已提交pr ->master分支)
axvm: https://github.com/DINGBROK423/axvm/tree/virtio-blk (依赖axvmconfig,AxVirtio-blk,axdevice 已提交pr ->next分支)
axvisor: https://github.com/DINGBROK423/axvisor/tree/next2-vblock (依赖axvmconfig,AxVirtio-blk,axdevice, axvm,内置测试镜像和运行脚本)
当前这几个子仓库建立的依赖链都是基于我fork并修改的分支(/DINGBROK423/xx)。
测试块设备脚本:
- memory后端axvisor/tests/run_test.sh
- fs 后端axvisor/tests/run_test_fs.sh
工作总结
☑ 虚拟块设备接入
☑ 虚拟块设备读写测试
☑ 虚拟块设备fs后端(axfs)和memory后端支持
☑持久化存储功能
测试结果截图详见下面报告
第一周
本周主要在看项目架构以及各个模块之间依赖关系。目前思路是自己新建一个仓库来实现虚拟块设备(https://github.com/DINGBROK423/AxVirtio-blk.git 还没有push,有些接口还在本地调),实现axdevice_base里定义的接口规范,再把虚拟块设备模块接入到axdevice。但是经过观察貌似还有其他子仓库也要进行改动(如需要在 axvmconfig crate 的 EmulatedDeviceType 枚举中添加 VirtioBlk)
Guest OS
↓ (访问 virtio_mmio)
AxVM::run_vcpu → AxVmDevices::handle_mmio_read/write
↓
VirtioBlkDevice (实现 BaseMmioDeviceOps)
↓ (处理 virtio 队列、描述符等)
Host 文件系统/块设备 (/dev/sdb 或普通文件)