Chinaunix首页 | 论坛 | 博客
  • 博客访问: 3794449
  • 博文数量: 93
  • 博客积分: 3189
  • 博客等级: 中校
  • 技术积分: 4231
  • 用 户 组: 普通用户
  • 注册时间: 2009-02-02 13:29
个人简介

出没于杭州和青岛的程序猿一枚,对内核略懂一二

文章分类

全部博文(93)

文章存档

2016年(2)

2015年(3)

2014年(11)

2013年(29)

2012年(16)

2011年(5)

2010年(5)

2009年(22)

分类: 虚拟化

2013-12-02 11:26:44

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)




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