1. 介绍
- virtio 是一族设备
- 用在虚拟化环境中
- 在虚拟机中看起来是PF设备
- virito 协议要求
- 通用性:使用通用的总线协议和通用的中断方式
- 高效:设备需要保证cacheline的一致性
- 标准化:标准化的操作,不依赖于总线的类型,如PCI, MMIO, Channel IO等等
- 可扩展:设备和客户系统在设备初始化阶段通过feature bit进行协商保证前后版本兼容
2. 协议术语
- Legacy Interface:0.95版本的接口定义
- Legacy Device:实现了0.95版本的设备
- Legacy Driver:实现了0.95版本的前端驱动
- Transitional Device:同时支持0.95和1.0的设备
- Transitional Driver:同时支持0.95和1.0的前端驱动
- Non-Transitional Device:仅支持1.0的设备
- Non-Transitional Driver:仅支持0.95的前端驱动
3. 类型约定
- u8, u16, u32, u64 : unsigned int 类型,长度为8bit,16bit,32bit,64bit.
- le16, le32, le64:unsigned int 类型,长度为8bit,16bit,32bit,64bit,小端序
- be16, be32, be64: unsigned int 类型,长度为8bit,16bit,32bit,64bit,大端序
4. 参考协议
[RFC2119] Bradner S., “Key words for use in RFCs to Indicate Requirement Levels”, BCP 14,
RFC 2119, March 1997.
http://www.ietf.org/rfc/rfc2119.txt
[S390 PoP] z/Architecture Principles of Operation, IBM Publication SA22-7832,
http://publibfi.boulder.ibm.com/epubs/pdf/dz9zr009.pdf, and any future revisions
[S390 Common I/O] ESA/390 Common I/O-Device and Self-Description, IBM Publication SA22-7204,
http://publibfp.dhe.ibm.com/cgi-bin/bookmgr/BOOKS/dz9ar501/CCONTENTS,
and any future revisions
[PCI] Conventional PCI Specifications,
Specifications | PCI-SIG, PCI-SIG
[PCIe] PCI Express Specifications
Specifications | PCI-SIG, PCI-SIG
[IEEE 802] IEEE Standard for Local and Metropolitan Area Networks: Overview and Architecture,
http://standards.ieee.org/about/get/802/802.html, IEEE
[SAM] SCSI Architectural Model,
File Access Monitor
[SCSI MMC] SCSI Multimedia Commands,
File Access Monitor
[Virtio PCI Draft] Virtio PCI Draft Specification
http://ozlabs.org/~rusty/virtio-spec/virtio-0.9.5.pdf