Content Overview Virtual Disk Port to Intel platform

Slides:



Advertisements
Similar presentations
Chapter 13: I/O Systems I/O Hardware Application I/O Interface
Advertisements

Processes and Operating Systems
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
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
Addition Facts
So far Binary numbers Logic gates Digital circuits process data using gates – Half and full adder Data storage – Electronic memory – Magnetic memory –
OPERATING SYSTEMS Lecturer: Szabolcs Mikulas Office: B38B
Real Time Versions of Linux Operating System Present by Tr n Duy Th nh Quách Phát Tài 1.
Homework Reading Machine Projects Labs
Debugging operating systems with time-traveling virtual machines Sam King George Dunlap Peter Chen CoVirt Project, University of Michigan.
1 Towards Virtual Passthrough I/O on Commodity Devices Lei Xia, Jack Lange, Peter Dinda {lxia, jarusl, Department of Electrical.
Redesigning Xen Memory Sharing (Grant) Mechanism Kaushik Kumar Ram (Rice University) Jose Renato Santos (HP Labs) Yoshio Turner (HP Labs) Alan L. Cox (Rice.
Hardware-assisted Virtualization
Slide 19-1 Copyright © 2004 Pearson Education, Inc. Operating Systems: A Modern Perspective, Chapter 19.
© 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.
Virtual Switching Without a Hypervisor for a More Secure Cloud Xin Jin Princeton University Joint work with Eric Keller(UPenn) and Jennifer Rexford(Princeton)
COMP1214 Systems & Platforms: Operating Systems Concepts Dr. Yvonne Howard – Rikki Prince – 1.
3.1 Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition Process An operating system executes a variety of programs: Batch system.
Addition 1’s to 20.
25 seconds left…...
Week 1.
Virtualisation From the Bottom Up From storage to application.
We will resume in: 25 Minutes.
Installing Windows XP Professional Using Attended Installation Slide 1 of 30Session 8 Ver. 1.0 CompTIA A+ Certification: A Comprehensive Approach for all.
Differentiated I/O services in virtualized environments
Network Implementation for Xen and KVM Class project for E : Network System Design and Implantation 12 Apr 2010 Kangkook Jee (kj2181)
Operating System Structure. Announcements Make sure you are registered for CS 415 First CS 415 project is up –Initial design documents due next Friday,
OS Spring’03 Introduction Operating Systems Spring 2003.
Slide 3-1 Copyright © 2004 Pearson Education, Inc. Operating Systems: A Modern Perspective, Chapter 3 Operating System Organization.
E Virtual Machines Lecture 4 Device Virtualization
Tanenbaum 8.3 See references
Zen and the Art of Virtualization Paul Barham, et al. University of Cambridge, Microsoft Research Cambridge Published by ACM SOSP’03 Presented by Tina.
Microkernels, virtualization, exokernels Tutorial 1 – CSC469.
1 Unmodified Device Driver Reuse and Improved System Dependability via Virtual Machines Joshua LeVasseur, Volkmar Uhlig, Jan Stoess, and Stefan G¨otz University.
Benefits: Increased server utilization Reduced IT TCO Improved IT agility.
Virtualization: Not Just For Servers Hollis Blanchard PowerPC kernel hacker.
VirtualBox What you need to know to build a Virtual Machine.
Firmware Storage : Technical Overview Copyright © Intel Corporation Intel Corporation Software and Services Group.
Slide 3-1 Copyright © 2004 Pearson Education, Inc. Operating Systems: A Modern Perspective, Chapter 3.
Ihr Logo Operating Systems Internals & Design Principles Fifth Edition William Stallings Chapter 2 (Part II) Operating System Overview.
 Virtual machine systems: simulators for multiple copies of a machine on itself.  Virtual machine (VM): the simulated machine.  Virtual machine monitor.
CS533 - Concepts of Operating Systems 1 The Mach System Presented by Catherine Vilhauer.
A. Frank - P. Weisberg Operating Systems Structure of Operating Systems.
Full and Para Virtualization
Operating-System Structures
VMM Based Rootkit Detection on Android
Concepts and Structures. Main difficulties with OS design synchronization ensure a program waiting for an I/O device receives the signal mutual exclusion.
KVM: Virtualisation The Linux Way Amit Shah GEEP.
Open Source Virtualization Andrey Meganov RHCA, RHCX Consultant / VDEL
Virtualization Neependra Khare
Introduction to Operating Systems Concepts
Virtualization for Cloud Computing
Virtualization.
Virtualization Technology
Why VT-d Direct memory access (DMA) is a method that allows an input/output (I/O) device to send or receive data directly to or from the main memory, bypassing.
Virtualization Dr. Michael L. Collard
Operating System Structure
CS490 Windows Internals Quiz 2 09/27/2013.
Virtualization overview
OS Virtualization.
Virtualization Techniques
Windows Virtual PC / Hyper-V
CSE 451: Operating Systems Autumn Module 24 Virtual Machine Monitors
Sai Krishna Deepak Maram, CS 6410
Outline Operating System Organization Operating System Examples
Operating Systems Structure
CSE 451: Operating Systems Autumn Module 24 Virtual Machine Monitors
Presentation transcript:

CertiKOS Implementation Progress Liang Gu Yale University

Content Overview Virtual Disk Port to Intel platform Reduce virtual device code Virtual device at user mode Pass through device with IOMMU Demo

Progress after Boston PI meeting Virtualization Virtual devices: PCI, Virtual Disk ( virtio ,virtio block) Support Multiple VM guests Move virtual devices to execute in user mode IOMMU based device pass-through to guest OS Port CertiKOS to work on bare metal PCI and AHCI Port to Intel platform with VT-x Green- done Blue- almost done Red- ongoing

CertiKOS Architecture APP (uncertified) APP (certified) Mgmt Shell Mgmt OS (Linux) Commodity OS Application Master Master Syscall Slave Slave Syscall Process Management Virtual Machine Management Memory V-Interrupt V-Devices Hypercall Context IPC CertiKOS Bottom is the commodity hardware. Maybe we need to mention CertiKOS requires CPU provides hardware virtualization support, i.e. AMD SVM in latest CertiKOS. The medium layer is CertiKOS kernel. Hardware abstraction layer (HAL) provides some device drivers, e.g. PCI adaptor, hard disk drive, ethernet adaptor, etc. It’s almost empty in latest CertiKOS. The layer upon HAL provides basic kernel primitives. SMP management, memory management, virtual memory management, interrupt handling and spinlock are similar to those in other operating systems. The extension is the virtualization part, which is composed of SVM primitives, virtual devices and virtualization abstraction. SVM primitives provide functions to control the underlying AMD SVM CPU. Virtual Devices provide necessary device emulation and passthrough, e.g. CertiKOS emulates interrupt controller, programmable timer, keyboard controller, etc, blocks PCI adaptor and devices, and passes through other devices. Virtualization abstraction provides an abstract interface to other parts of CertiKOS kernel, so that they don’t need to take care which the underlying hardware virtualization is and if the access to devices from the guest should be emulated or just passed through. CertiKOS provides two kinds of runnable objects: process and virtual machine. Process is similar to those in other operating systems except that CertiKOS uses a much simple process model: each physical process core runs at most one process. Context contains the information used in process schedule, trap handling, etc. IPC provides message-passing style communication mechanism between processes. Virtual machine management is to Create a virtualization environment for the guest, which contains virtualizing CPU, memory, interrupt mechanism and a minimal set of devices. Control the execution of the virtual machine, e.g. start, stop, resume, shutdown. (functions in bold have not been done yet) Handle the hypercals. The details will be shown in the following slides. CertiKOS provides two kinds of system calls: Master system calls are for the management shell. Slave system calls are for the certikos-based applications. We can run four kinds of applications upon CertiKOS. Management shell, which launches and controls other applications. We plan to move it to the guest and implement it as a userspace application of the guest OS. In this way the management shell can leverage the libraries in the guest OS to provide a better user interface, and use hypercalls provided by CertiKOS to complete the management work. Virtual machine, or guest, in which runs a commodity operating system and its applications. No modifications are required for both the commodity operating system and the applications, except when they want to use hypercalls provided by CertiKOS. Except the hypercall, CertiKOS is transparent for them. Uncertified CertiKOS-based applications. Certified CertiKOS-based applications, which are formally certified and doing security-concerned jobs. Only objects below the red line are in the trusted computing base. SMP Management Virtual Memory Interrupt Handling Vconsole Virtualization Abstraction SVM Primitives Virtual Devices Memory Management Hardware Abstraction Layer Hardware CPU Cores Memory Hard Disk Network . . .

CertiKOS Architecture APP (uncertified) APP (certified) Virtual Devices Mgmt Shell Mgmt OS (Linux) Commodity OS Application Master Master Syscall Slave Slave Syscall Process Management Virtual Machine Management Memory V-Interrupt V-Devices Hypercall Context IPC CertiKOS Bottom is the commodity hardware. Maybe we need to mention CertiKOS requires CPU provides hardware virtualization support, i.e. AMD SVM in latest CertiKOS. The medium layer is CertiKOS kernel. Hardware abstraction layer (HAL) provides some device drivers, e.g. PCI adaptor, hard disk drive, ethernet adaptor, etc. It’s almost empty in latest CertiKOS. The layer upon HAL provides basic kernel primitives. SMP management, memory management, virtual memory management, interrupt handling and spinlock are similar to those in other operating systems. The extension is the virtualization part, which is composed of SVM primitives, virtual devices and virtualization abstraction. SVM primitives provide functions to control the underlying AMD SVM CPU. Virtual Devices provide necessary device emulation and passthrough, e.g. CertiKOS emulates interrupt controller, programmable timer, keyboard controller, etc, blocks PCI adaptor and devices, and passes through other devices. Virtualization abstraction provides an abstract interface to other parts of CertiKOS kernel, so that they don’t need to take care which the underlying hardware virtualization is and if the access to devices from the guest should be emulated or just passed through. CertiKOS provides two kinds of runnable objects: process and virtual machine. Process is similar to those in other operating systems except that CertiKOS uses a much simple process model: each physical process core runs at most one process. Context contains the information used in process schedule, trap handling, etc. IPC provides message-passing style communication mechanism between processes. Virtual machine management is to Create a virtualization environment for the guest, which contains virtualizing CPU, memory, interrupt mechanism and a minimal set of devices. Control the execution of the virtual machine, e.g. start, stop, resume, shutdown. (functions in bold have not been done yet) Handle the hypercals. The details will be shown in the following slides. CertiKOS provides two kinds of system calls: Master system calls are for the management shell. Slave system calls are for the certikos-based applications. We can run four kinds of applications upon CertiKOS. Management shell, which launches and controls other applications. We plan to move it to the guest and implement it as a userspace application of the guest OS. In this way the management shell can leverage the libraries in the guest OS to provide a better user interface, and use hypercalls provided by CertiKOS to complete the management work. Virtual machine, or guest, in which runs a commodity operating system and its applications. No modifications are required for both the commodity operating system and the applications, except when they want to use hypercalls provided by CertiKOS. Except the hypercall, CertiKOS is transparent for them. Uncertified CertiKOS-based applications. Certified CertiKOS-based applications, which are formally certified and doing security-concerned jobs. Only objects below the red line are in the trusted computing base. SMP Management Virtual Memory Interrupt Handling Vconsole Virtualization Abstraction SVM /VMX Primitives SVM Primitives Virtual Devices Memory Management Hardware Abstraction Layer Hardware CPU Cores Memory Hard Disk Network . . .

CertiKOS Architecture APP (uncertified) APP (certified) Virtual Devices Mgmt Shell Mgmt OS (Linux) Commodity OS Application Master Master Syscall Slave Slave Syscall Process Management Virtual Machine Management Memory V-Interrupt V-Devices Hypercall Context IPC CertiKOS Bottom is the commodity hardware. Maybe we need to mention CertiKOS requires CPU provides hardware virtualization support, i.e. AMD SVM in latest CertiKOS. The medium layer is CertiKOS kernel. Hardware abstraction layer (HAL) provides some device drivers, e.g. PCI adaptor, hard disk drive, ethernet adaptor, etc. It’s almost empty in latest CertiKOS. The layer upon HAL provides basic kernel primitives. SMP management, memory management, virtual memory management, interrupt handling and spinlock are similar to those in other operating systems. The extension is the virtualization part, which is composed of SVM primitives, virtual devices and virtualization abstraction. SVM primitives provide functions to control the underlying AMD SVM CPU. Virtual Devices provide necessary device emulation and passthrough, e.g. CertiKOS emulates interrupt controller, programmable timer, keyboard controller, etc, blocks PCI adaptor and devices, and passes through other devices. Virtualization abstraction provides an abstract interface to other parts of CertiKOS kernel, so that they don’t need to take care which the underlying hardware virtualization is and if the access to devices from the guest should be emulated or just passed through. CertiKOS provides two kinds of runnable objects: process and virtual machine. Process is similar to those in other operating systems except that CertiKOS uses a much simple process model: each physical process core runs at most one process. Context contains the information used in process schedule, trap handling, etc. IPC provides message-passing style communication mechanism between processes. Virtual machine management is to Create a virtualization environment for the guest, which contains virtualizing CPU, memory, interrupt mechanism and a minimal set of devices. Control the execution of the virtual machine, e.g. start, stop, resume, shutdown. (functions in bold have not been done yet) Handle the hypercals. The details will be shown in the following slides. CertiKOS provides two kinds of system calls: Master system calls are for the management shell. Slave system calls are for the certikos-based applications. We can run four kinds of applications upon CertiKOS. Management shell, which launches and controls other applications. We plan to move it to the guest and implement it as a userspace application of the guest OS. In this way the management shell can leverage the libraries in the guest OS to provide a better user interface, and use hypercalls provided by CertiKOS to complete the management work. Virtual machine, or guest, in which runs a commodity operating system and its applications. No modifications are required for both the commodity operating system and the applications, except when they want to use hypercalls provided by CertiKOS. Except the hypercall, CertiKOS is transparent for them. Uncertified CertiKOS-based applications. Certified CertiKOS-based applications, which are formally certified and doing security-concerned jobs. Only objects below the red line are in the trusted computing base. SMP Management Virtual Memory Interrupt Handling Vconsole Virtualization Abstraction SVM Primitives SVM /VMX Primitives IOMMU Memory Management Hardware Abstraction Layer Hardware CPU Cores Memory Hard Disk Network . . .

Content Overview Virtual Disk Port to Intel platform Reduce virtual device code Virtual device at user mode Pass through device with IOMMU Demo

Virtual Disk … Motivation Virtual PCI Virtual disk based on virtio Enable CertiKOS to boot guest OS on bare metal Separate the storage of guest OS from CertiKOS physically Virtual PCI Virtual disk based on virtio a. Mgmt shell Linux Legacy OS, e.g., Linux c. CertiKOS-based APP … d.Mgmt tool in Linux CertiKOS Virtual Disk disk0 disk1

Virtio Virtio Rusty Russell, “virtio: Towards a De-Facto Standard For Virtual I/O Devices” Available in both Linux and Windows A simple and efficient framework to provide virtual devices to guest OS Virtio is an abstraction for a set of common virtual devices Legacy OS, e.g., Linux Add an example to show the virtqueue and virtring Virtqueue Front-end driver Back-end driver CertiKOS … Disk driver disk1

Boot CertiKOS on Bare Metal Multiple settings for booting CertiKOS on bare metal Boot CertiKOS and Guest on the same disk Boot CertiKOS and Guest on different disks Boot CertiKOS on USB and boot the guest on disk

Content Overview Virtual Disk Port to Intel platform Reduce virtual device code Virtual device at user mode Pass through device with IOMMU Demo

Port to Intel platform Motivation Modularized implementation LOCs Another widely supported Hardware-based Virtualization solution Widely available VT-d support Modularized implementation Separate architecture dependent modules Integrated by interfaces in the abstraction layer LOCs Sys/virt/svm 1775 Sys/virt/vmx 2344 VMX uses more sophisticated methods to control the virtualization Access memory region for control data structures by special instructions, instead of direct memory read and write More sophisticated setup Virtual Machine Management Virtualization Abstraction SVM Primitive VMX Primitive Virtual Devices

Content Overview Virtual Disk Port to Intel platform Reduce virtual device code Virtual device at user mode Pass through device with IOMMU Demo

Virtual Device LOCs in previous version at Boston PI meeting Sys/virt/ 4441* Sys/virt/dev/ 2384* With Virtual PIC, KBD, PIT, text mode VGA LOCs in current clean_code branch Sys/virt/ 8237*# Sys/virt/dev/ 3643* Added virtual PCI, Virtio, Virtio-blk Considering more devices, such as USB, Network, … Moving virtual device to execute in user mode Securely pass through device with IOMMU ( * counted by cloc 1.56) ( # with Intel vt-x )

Virtual Device at User Mode For untrusted guest domains, their virtual devices don’t have to be trusted Process model extension Multiple processes on a single core based on round-robin scheduling Message passing via channels among processes a. Idle … d. Legacy Linux V-KBD V-PIC V-PIT … CertiKOS CPU0 CPU1

Virtual Device at User Mode Support multiple VM guests with VM session extension VM Session 1 VM Session 2 a. Idle … … d. Legacy Linux Guest Linux 2 … … … CertiKOS … CPU0 CPU1 CPU2

Pass Through Device Exclusively used devices can be directly exposed to guest VM, without introducing device virtualization code However, malicious DMA operations are capable of attacking memory spaces IOMMU / VT-d allow a guest OS running under a VMM to have direct control of a device Provide fine-grain control of device access to system memory

IOMMU from AMD IOMMU specification Revision 2

IOMMU Main memory IOMMU MMU Device CPU Physical Address IOMMU MMU Device Address Virtual Address Device CPU from http://en.wikipedia.org/wiki/IOMMU

IOMMU IOMMU MMU Device CPU Page Table 1 Page Table 2 IOMMU MMU Device Table … Device Address Virtual Address … … … Device CPU … Interrupt Remapping Table Based on image from http://en.wikipedia.org/wiki/IOMMU

Pass through device with IOMMU Legacy OS, e.g., Linux NPT Device Table CertiKOS … Interrupt Remapping Table IOMMU device

Content Overview Virtual Disk Port to Intel platform Reduce virtual device code Virtual device at user mode Pass through device with IOMMU Demo

CertiKOS Demo Setting For Previous Version … … BSP AP AP KVM a. Mgmt shell Legacy OS, e.g., Linux c. CertiKOS-based APP … master slave slave CertiKOS Dotted line of mgmt Linux means it is under developing. … Qemu BSP AP AP Linux KVM AMD processor with SVM BSP- Boot Strap Processor AP-Application Processor

AMD processor with SVM/ Intel with VT-x CertiKOS Demo Setting a. Mgmt shell Legacy OS, e.g., Linux c. CertiKOS-based APP … master slave slave CertiKOS Dotted line of mgmt Linux means it is under developing. AMD processor with SVM/ Intel with VT-x BSP- Boot Strap Processor AP-Application Processor

Thank you!