1 Towards Virtual Passthrough I/O on Commodity Devices Lei Xia, Jack Lange, Peter Dinda {lxia, jarusl, Department of Electrical.

Slides:



Advertisements
Similar presentations
Writing Good Use Cases - Instructor Notes
Advertisements

Chapter 13: I/O Systems I/O Hardware Application I/O Interface
© 2008 Pearson Addison Wesley. All rights reserved Chapter Seven Costs.
Chapter 1 The Study of Body Function Image PowerPoint
Processes and Operating Systems
1 Copyright © 2013 Elsevier Inc. All rights reserved. Chapter 1 Embedded Computing.
1 Copyright © 2013 Elsevier Inc. All rights reserved. Appendix 01.
1 Copyright © 2013 Elsevier Inc. All rights reserved. Chapter 3 CPUs.
1 Building a Fast, Virtualized Data Plane with Programmable Hardware Bilal Anwer Nick Feamster.
UNITED NATIONS Shipment Details Report – January 2006.
Jeopardy Q 1 Q 6 Q 11 Q 16 Q 21 Q 2 Q 7 Q 12 Q 17 Q 22 Q 3 Q 8 Q 13
Exit a Customer Chapter 8. Exit a Customer 8-2 Objectives Perform exit summary process consisting of the following steps: Review service records Close.
FACTORING ax2 + bx + c Think “unfoil” Work down, Show all steps.
So far Binary numbers Logic gates Digital circuits process data using gates – Half and full adder Data storage – Electronic memory – Magnetic memory –
1 Processes and Threads Creation and Termination States Usage Implementations.
Chapter 5 Input/Output 5.1 Principles of I/O hardware
Making the System Operational
Chapter 1 Introduction Copyright © Operating Systems, by Dhananjay Dhamdhere Copyright © Introduction Abstract Views of an Operating System.
Real Time Versions of Linux Operating System Present by Tr n Duy Th nh Quách Phát Tài 1.
Intel VTune Yukai Hong Department of Mathematics National Taiwan University July 24, 2008.
1 Peripheral Component Interconnect (PCI). 2 PCI based System.
Electric Bus Management System
Mehdi Naghavi Spring 1386 Operating Systems Mehdi Naghavi Spring 1386.
Debugging operating systems with time-traveling virtual machines Sam King George Dunlap Peter Chen CoVirt Project, University of Michigan.
Content Overview Virtual Disk Port to Intel platform
I/O Systems.
Redesigning Xen Memory Sharing (Grant) Mechanism Kaushik Kumar Ram (Rice University) Jose Renato Santos (HP Labs) Yoshio Turner (HP Labs) Alan L. Cox (Rice.
Seungmi Choi PlanetLab - Overview, History, and Future Directions - Using PlanetLab for Network Research: Myths, Realities, and Best Practices.
Hardware-assisted Virtualization
虛擬化技術 Virtualization Technique
Virtual Memory 1 Computer Organization II © McQuain Virtual Memory Use main memory as a cache for secondary (disk) storage – Managed jointly.
1 CMSC421: Principles of Operating Systems Nilanjan Banerjee Principles of Operating Systems Acknowledgments: Some of the slides are adapted from Prof.
© 2010 VMware Inc. All rights reserved Application-level mobile virtualization Harvey Tuch, Staff Engineer, Mobile Virtualization Platform January 25 th.
Virtualization Technology
Operating Systems Operating Systems - Winter 2011 Dr. Melanie Rieback Design and Implementation.
Operating Systems Operating Systems - Winter 2012 Dr. Melanie Rieback Design and Implementation.
Operating Systems Operating Systems - Winter 2010 Chapter 3 – Input/Output Vrije Universiteit Amsterdam.
VOORBLAD.
Factor P 16 8(8-5ab) 4(d² + 4) 3rs(2r – s) 15cd(1 + 2cd) 8(4a² + 3b²)
© 2012 National Heart Foundation of Australia. Slide 2.
Understanding Generalist Practice, 5e, Kirst-Ashman/Hull
Global Analysis and Distributed Systems Software Architecture Lecture # 5-6.
Designing Embedded Hardware 01. Introduction of Computer Architecture Yonam Institute of Digital Technology.
KAIST Computer Architecture Lab. The Effect of Multi-core on HPC Applications in Virtualized Systems Jaeung Han¹, Jeongseob Ahn¹, Changdae Kim¹, Youngjin.
25 seconds left…...
Januar MDMDFSSMDMDFSSS
©Brooks/Cole, 2001 Chapter 12 Derived Types-- Enumerated, Structure and Union.
PSSA Preparation.
Installing Windows XP Professional Using Attended Installation Slide 1 of 30Session 8 Ver. 1.0 CompTIA A+ Certification: A Comprehensive Approach for all.
TCP/IP Protocol Suite 1 Chapter 18 Upon completion you will be able to: Remote Login: Telnet Understand how TELNET works Understand the role of NVT in.
Minimal-overhead Virtualization of a Large Scale Supercomputer John R. Lange and Kevin Pedretti, Peter Dinda, Chang Bae, Patrick Bridges, Philip Soltero,
Virtualization for Cloud Computing
Virtual WiFi: Bring Virtualization from Wired to Wireless Lei Xia, Sanjay Kumar, Xue Yang Praveen Gopalakrishnan, York Liu, Sebastian Schoenberg, Xingang.
Virtualization Technology Prof D M Dhamdhere CSE Department IIT Bombay Moving towards Virtualization… Department of Computer Science and Engineering, IIT.
Tanenbaum 8.3 See references
Symbiotic Virtualization John R. Lange Thesis Proposal Department of Electrical Engineering and Computer Science Northwestern University June 2009.
SymCall: Symbiotic Virtualization Through VMM-to-Guest Upcalls John R. Lange and Peter Dinda University of Pittsburgh (CS) Northwestern University (EECS)
Benefits: Increased server utilization Reduced IT TCO Improved IT agility.
Virtualization: Not Just For Servers Hollis Blanchard PowerPC kernel hacker.
 Virtual machine systems: simulators for multiple copies of a machine on itself.  Virtual machine (VM): the simulated machine.  Virtual machine monitor.
Full and Para Virtualization
Introduction to Virtualization
Virtualization Technology
OS Virtualization.
Windows Virtual PC / Hyper-V
Presentation transcript:

1 Towards Virtual Passthrough I/O on Commodity Devices Lei Xia, Jack Lange, Peter Dinda {lxia, jarusl, Department of Electrical Engineering and Computer Science Northwestern University

2 Overview VPIO: A modeling-based approach to high performance I/O virtualization for commodity devices –Models could be provided by HW vendors Intermediate option between passthrough I/O, self-virtualizing devices, and emulated I/O Promising initial results Work in progress 2

3 Outline I/O virtualization techniques Idea of VPIO Palacios VMM VPIO system Device Model Discussion Conclusion 3

4 I/O virtualization – full emulated I/O 4 No guest software change All New Device Drivers High performance overhead [Sugerman01]

5 I/O virtualization – paravirtualized I/O [Barham03, Levasseur04] Performance Reuse Device Driver Change guest device driver

6 I/O virtualization – Passthrough I/O Native performance Guest responsible for device driver Specialized hardware support Self-virtualizing devices [Liu06, Raj07,Shafer07]

7 I/O virtualization – Direct-Mapped I/O Reusablity/multiplexing Security Issue 7 Guest OS VMM Device Mapping

8 VPIO Goals Achieve safe and secure direct- mapped I/O With reusability/multiplexing To support commodity devices –No self-virtualized features Without losing too much performance –Expect a little more performance overhead compared to pass-through IO

9 Two Requirements For VPIO Inexpensive formal model of device –Building model easier than building device driver –Inexpensive to drive such model Device can be context-switched 9

10 Core Idea of VPIO VMM maintains a formal model of device – keeps track of the physical device status – driven by guest/device interactions – simpler than a device driver/virtual device Model determines –Reusable state – whether device is currently serially reusable –DMA – whether a DMA is about to starting and what memory locations will be used –Other interesting states

11 Introducing Palacios New VMM for HPC, architecture, systems, teaching, and other uses –Fully Open Source, BSD License Type I VMM, embeddable into existing kernels Operating System independent –Kitten HPC OS (Sandia National Labs) –GeekOS (University of Maryland) Implemented using Hardware Virtualization Extensions Part of the V3VEE project –Collaboration between NU and UNM – Available at: – 11

12 Palacios Overview Supports 32 and 64 bit environments –Hosts and Guests –Currently supports Linux Guests Currently uses AMD SVM extensions –partial Intel VT support Full hardware virtualization –Does not use paravirtualization –Includes complement of virtual devices More details: –J. Lange, P. Dinda, An Introduction to the Palacios Virtual Machine Monitor---Release 1.0, Northwestern University EECS Technical Report NWU-EECS-08-11, November, –See us for more info

13 Palacios Details Virtualization Interface –Hook IO Ports –Hook Memory Regions –Hook interrupts –Handle VMExits Host Interface –Access standard OS facilities (debugging, memory allocation) –Hook host events Interrupts, timer, keyboard, etc… Can use shadow or nested paging

14 Palacios People Northwestern University –Jack Lange (Lead Ph.D student) –Lei Xia (Ph.D student) –Peter Dinda (PI, Project Lead) University of New Mexico –Zheng Cui (Ph.D student) –Patrick Bridges (PI) Others –Trammell Hudson and Kevin Pedreti (Sandia)

15 Guest OS Unmodified Driver Device Modeling Monitor (DMM) Physical Device Palacios VMM Hooked I/O Unhooked I/O Interrupt DMA Guest OS Unmodified Driver VPIO In Context Of Palacios

16 Current Status VPIO is a work in progress What is implemented in Palacios –hook I/O ports –hook memory address (byte) What is tested outside –Device Model embedded and tested on QEMU PC emulator version

17 Device requests and interrupts Guest talks to device by IN/OUT –Memory-mapped I/O will be similar –hooked I/O list, a list of I/O port operations for read/write or both. VMM intercepts these I/Os –I/O port reads/writes drive model and HW –unhooked I/O list (ideally as large as possible) Interrupts –All physical interrupts are handled by VMM –Interrupts drive model and are also delivered to guest 17

18 DMA DMA is initiated directly on physical device by guest –DMM is aware of guests DMA operations due to hooked ports –DMA destination physical address is checked before the physical DMA operation is performed –If validated, let DMA occur, otherwise, deny it. Challenge: Dealing with DMA failure –How to notify the guest? –Ignore the DMA? –Machine Check Exception? Challenge: Dealing with physical address translations 18

19 Device Multiplexing Context switch between guests –Switching when device in reusable state –Device context (related registers, model) –If not owning device, guests operation requests are suspended Challenge: Device handoff on interrupt –Handle incoming packet for NIC –Coming back later 19

20 Cost of VPIO – Experimental Setup The performance –Guests I/Os performance overhead –Palacios running on Qemu and HP system –Qemu PC emulator –HP ML GHz, AMD Opteron

21 Issue: Cost of exits (Palacios / AMD SVM) 21

22 VPIO Issue 1/2 : Exit Costs Fundamental issue: O(1000) cycle exits. Try to minimize number of hooked I/O ports –Model is cheaper in terms of exits than an emulated device –Not all I/O ports are needed to drive model 22

23 VPIO Issue 2/2 : Model Can we build such models? –Is it feasible to build the model? –How easy to build such model, easier than device driver? How expensive are they to run? 23

24 Device Model Not for verification, not a complete behavioral model Only used to determine… –Whether and when the device is reusable –Whether DMA is to be initiated –What device requests are needed to update model State machine, with extra information –Events: device requests, interrupts –Checking functions, triggered by state transition –State transition approve or deny 24

25 Experimental Setup Testing setup –Embedded model in QEMU PC emulator version –Tested model on a set of network applications running in guest OS on Qemu 25

26 NE2K NIC Example Checking Function 26 Model is small ~700 LOC

27 NE2K Model Performance 27 Only a small fraction of I/Os are needed to drive model

28 Experience with NE2K Model Only about 1 in 30 I/O port reads/writes need to be intercepted to drive the model Average non-exit cost of updating the model is ~100 cycles –And could be done in parallel with device execution 28

29 Challenges VM exit performance is primary concern –Further reduce I/O operations intercepted –Move model into guest –Either cooperatively or by code injection Handling incoming device input Network card receive when incorrect guest has control of NIC Hardware manufacturers could provide models along with device drivers 29

30 Conclusions VPIO: A modeling-based approach to high performance I/O virtualization for commodity devices Intermediate option between passthrough I/O and emulated I/O Promising initial results Work in progress 30

31 Thanks! Questions??