SR-IOV Networking in Xen: Architecture, Design and Implementation 2008 USENIXSR-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 PCIsubsystem for discovery, initialization and configuration, which simplifies guest OS anddevice driver. 因为VF不是真正的PCI设备,无法正常自举,Xen SR-IOV networking architectureutilizes 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 utilization2 increasing the scalability 3 sharing capabilities of the device.(主要是指VF各种网络配置最终映射到PF有复用的可能) 示例设备:SR-IOV network card (Intel 82576)
阅读(3939) | 评论(0) | 转发(0) |