Chinaunix首页 | 论坛 | 博客
  • 博客访问: 610898
  • 博文数量: 197
  • 博客积分: 7001
  • 博客等级: 大校
  • 技术积分: 2155
  • 用 户 组: 普通用户
  • 注册时间: 2005-02-24 00:29
文章分类

全部博文(197)

文章存档

2022年(1)

2019年(2)

2015年(1)

2012年(100)

2011年(69)

2010年(14)

2007年(3)

2005年(7)

分类: 虚拟化

2011-03-04 10:33:05

SR-IOV Networking in Xen: Architecture, Design and Implementation  2008 USENIX

SR-IOV 设备可以把一个物理设备分解成多个虚拟部件(VF),各VM可直接访问VF,无须经过VMM,从而大大提高性能。An SRIOV device presents single or multiple Physical Functions (PFs) which are standard PCIe functions. Each PF can have zero or more Virtual Functions (VFs) which is a “light-weight” PCIe function that has enough resource for major data movement, as well as a unique requester identifier (RID) to index the IOMMU page table for address translation.

需要的支持:
  • Direct I/O access (also known as device pass through)
  • Guest MMIO(Memory Mapped IO) of pass through device
  • MSI and MSIX mechanism provide software ability to program interrupt vector for individual MSI or MSI-X interrupt source. 中断可以直接到VF,不需要VMM分发。
  • IOMMU


XEN的实现
the Physical Function has a driver running in the driver domain that serves as a “master” and each Virtual Function exposed to a guest VM has its own virtual driver.

VF 的配置过程还是需要trap and emulate,而MDD 负责set the number of VFs, globally enable or disable VFs, as well as network specific configurations such as MAC address and VLAN setting for each VF.
A Virtual Function Device Driver (VDD) running in the guest.VF configuration space access from VDD is trap and emulated by VMM to present guest a standard PCIe device to reuse existing PCI
subsystem for discovery, initialization and configuration, which simplifies guest OS and
device driver. 因为VF不是真正的PCI设备,无法正常自举,Xen SR-IOV networking architecture
utilizes Linux PCI hot plug API to dynamically add VFs to dom0 Linux.

PF driver, or Master Device Driver (MDD), running in driver domain (dom0 in Xen) controls underlying shared resources for all associated VFs. MDD 有更好的安全控制各个VF(比起xen 原来把整个设备用于某个VM相比)

PF/VF通信是利用Intel 提供的硬件机制

好处:
1  direct I/O throughput and reduced CPU utilization
2 increasing the scalability
3  sharing capabilities of the device.(主要是指VF各种网络配置最终映射到PF有复用的可能)

示例设备:SR-IOV network card (Intel 82576)




阅读(4256) | 评论(0) | 转发(1) |
给主人留下些什么吧!~~