ABSTRACT
In a virtualized environment, device drivers are often run inside a virtual machine (VM) rather than in the hypervisor, for reasons of safety and reduction in software engineering effort. Unfortunately, this approach results in poor performance for I/O-intensive devices such as network cards. The alternative approach of running device drivers directly in the hypervisor yields better performance, but results in the loss of safety guarantees for the hypervisor and incurs additional software engineering costs.
In this paper we present TwinDrivers, a framework which allows us to semi-automatically create safe and efficient hypervisor drivers from guest OS drivers. The hypervisor driver runs directly in the hypervisor, but its data resides completely in the driver VM address space. A Software Virtual Memory mechanism allows the driver to access its VM data efficiently from the hypervisor running in any guest context, and also protects the hypervisor from invalid memory accesses from the driver. An upcall mechanism allows the hypervisor to largely reuse the driver support infrastructure present in the VM. The TwinDriver system thus combines most of the performance benefits of hypervisor-based driver approaches with the safety and software engineering benefits of VM-based driver approaches.
Using the TwinDrivers hypervisor driver, we are able to improve the guest domain networking throughput in Xen by a factor of 2.4 for transmit workloads, and 2.1 for receive workloads, both in CPU-scaled units, and achieve close to 64-67 of native Linux throughput.
- The netperf benchmark. http://www.netperf.org/netperf/NetperfPage.html.Google Scholar
- Specweb'99 benchmark. http://spec.org/web99.Google Scholar
- P. Barham, B. Dragovic, K. Fraser, S. Hand, T. Harris, A. Ho, R. Neugebauer, I. Pratt, and A. Warfield. Xen and the art of virtualization. In 19th ACM Symposium on Operating Systems Principles, Oct 2003. Google Scholar
Digital Library
- Brian N. Bershad, Stefan Savage, Emin Gun Sirer, Marc Fiuczynski, David Becker, Susan Eggers, and Craig Chambers. Extensibility, Safety and Performance in the SPIN operating System. In Symposium on Operating System Principles (SOSP), 1995. Google Scholar
Digital Library
- Ulfar Erlingsson, Martin Abadi, Michael Vrable, Mihai Budiu, and George C. Necula. XFI: Software Guards for System Address Spaces. In Operating Systems Design and Implementation (OSDI), 2006. Google Scholar
Digital Library
- Bryan Ford, Godmar Back, Greg Benson, Jay Lepreau, Albert Lin, and Olin Shivers. The Flux OSKit: A Substrate for Kernel and Language Research. In 16th ACM Symposium on Operating System Principles (SOSP'97), Saint-Malo, France, October 1997. Google Scholar
Digital Library
- K. Fraser, S. Hand, R. Neugebauer, I. Pratt, A. Warfield, and M. Williamson. Safe hardware access with the Xen virtual machine monitor. In 1st Workshop on Operating System and Architectural Support for the on demand IT InfraStructure (OASIS), Oct 2004.Google Scholar
- Vinod Ganapathy, Matthew Renzelmann, Arini Balakrishnan, Michael Swift, and Somesh Jha. The Design and Implementation of Microdrivers. In 13th Internantional Conference on Architectural Support for Programming Languages and Operating Systems (ASPLOS'08), Seattle, WA, March 2008. Google Scholar
Digital Library
- Jorrit N. Herder, Herbert Boss, Ben Gras, Philip Homburg, and Andrew S. Tanenbaum. MINIX 3: A Highly Reliable, Self-Repairing Operating System. ACM SIGOPS Operating System Review, 40(3):80--89, July 2006. Google Scholar
Digital Library
- Joshua LeVasseur, Volkmar Uhlig, Jan Stoess, and Stefan Gotz. Unmodified Driver Reuse and Improved System Dependability via Virtual Machines. In Operating Systems Design and Implementation (OSDI'04), San Francisco, CA, December 2004. Google Scholar
Digital Library
- Aravind Menon, Alan L. Cox, and Willy Zwaenepoel. Optimizing Network Virtualization in Xen. In USENIX Annual Technical Conference, Boston, MA, June 2006. Google Scholar
Digital Library
- Aravind Menon, Jose Renato Santos, Yoshio Turner, G. (John) Janakiraman, and Willy Zwaenepoel. Diagnosing Performance Overheads in the Xen Virtual Machine Environment. In First ACM/USENIX Conference on Virtual Execution Environments (VEE'05), Chicago, USA, June 2005. Google Scholar
Digital Library
- Aravind Menon and Willy Zwaenepoel. Optimizing TCP Receive Performance. In USENIX Annual Technical Conference, Boston, MA, June 2008. Google Scholar
Digital Library
- D. Mosberger and T. Jin. httperf: A tool for measuring web server performance. In First Workshop on Internet Server Performance, pages 59--67, Madison, WI, June 1998.Google Scholar
Digital Library
- Jose Renato Santos, Yoshio Turner, G. (John) Janakiraman, and Ian Pratt. Bridging the gap between hardware and software techniques for i/o virtualization. In USENIX Annual Technical Conference, 2008. Google Scholar
Digital Library
- Margo I. Seltzer, Yasuhiro Endo, Christopher Small, and Keith A. Smith. Dealing with Disaster: Surviving Misbehaved Kernel Extensions. In Operating Systems Design and Implementation (OSDI), 1996. Google Scholar
Digital Library
- Michael M. Swift, Brian N. Bershad, and Henry M. Levy. Improving the Reliability of Commodity Operating Systems. In 19th ACM Symposium on Operating System Principles (SOSP'03), Bolton Landing, NY, October 2003. Google Scholar
Digital Library
- Rob von Behren, Jeremy Condit, Feng Zhou, George C. Necula, and Eric Brewer. Capriccio: Scalable Threads for Internet Services. In 19th ACM Symposium on Operating Systems Principles, Oct 2003. Google Scholar
Digital Library
- Robert Wahbe, Steven Lucco, Thomas E. Anderson, and Susan L. Graham. Efficient software-based fault isolation. In SOSP'93, 1993. Google Scholar
Digital Library
- Carl A. Waldspurger. Memory Resource Management in VMware ESX Server. In OSDI'02, 2002. Google Scholar
Digital Library
- Paul Willmann, Jeffrey Shafer, David Carr, Aravind Menon, Scott Rixner, Alan L. Cox, and Willy Zwaenepoel. Concurrent Direct Network Access for Virtual Machine Monitors. In HPCA, 2007. Google Scholar
Digital Library
Index Terms
TwinDrivers: semi-automatic derivation of fast and safe hypervisor network drivers from guest OS drivers
Recommendations
TwinDrivers: semi-automatic derivation of fast and safe hypervisor network drivers from guest OS drivers
ASPLOS 2009In a virtualized environment, device drivers are often run inside a virtual machine (VM) rather than in the hypervisor, for reasons of safety and reduction in software engineering effort. Unfortunately, this approach results in poor performance for I/O-...
TwinDrivers: semi-automatic derivation of fast and safe hypervisor network drivers from guest OS drivers
ASPLOS 2009In a virtualized environment, device drivers are often run inside a virtual machine (VM) rather than in the hypervisor, for reasons of safety and reduction in software engineering effort. Unfortunately, this approach results in poor performance for I/O-...
SRVM: Hypervisor Support for Live Migration with Passthrough SR-IOV Network Devices
VEE '16Single-Root I/O Virtualization (SR-IOV) is a specification that allows a single PCI Express (PCIe) device (ysical function or PF) to be used as multiple PCIe devices (virtual functions or VF). In a virtualization system, each VF can be directly assigned ...








Comments