virtio/vhost介绍

(1) Virtio Introduction--Paravirtualized I/O with KVM and lguest
Virtio is an I/O virtualization framework for Linux. In a nutshell, virtio is an abstraction layer over devices in a paravirtualized hypervisor. virtio was developed by Rusty Russell
 in support of his own virtualization solution called lguest. This article begins with an introduction to paravirtualization and 
emulated devices, and then explores the details of virtio. The focus is on the virtio framework from the 2.6.30 kernel release.
 
(2) Vhost-net introduction -- a kernel level virtio server(Michael S. Tsirkin)
What it is: 
vhost net is a character device that can be used to reduce the number of system calls involved in virtio networking.
Existing virtio net code is used in the guest without modification.

There's similarity with vringfd, with some differences and reduced scope
- uses eventfd for signalling
- structures can be moved around in memory at any time (good for migration)
- support memory table and not just an offset (needed for kvm)

common virtio related code has been put in a separate file vhost.c and can be made into a separate module if/when more backend appear.  I used
Rusty's lguest.c as the source for developing this part : this supplied me with witty comments I wouldn't be able to write myself.

What it is not: 
vhost net is not a bus, and not a generic new system call. No assumptions are made on how guest performs hypercalls.
Userspace hypervisors are supported as well as kvm.

How it works: 
Basically, we connect virtio frontend (configured by userspace) to a backend. The backend could be a network device, or a
tun-like device. In this version I only support raw socket as a backend, which can be bound to e.g. SR IOV, or to macvlan device.  Backend is
also configured by userspace, including vlan/mac etc.
 
摘自:
https://lwn.net/Articles/346267/
https://www.ibm.com/developerworks/library/l-virtio/
  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值