Running virtualized native drivers in User Mode Linux p.1/30



Similar documents
Running virtualized native drivers in User Mode Linux

Lecture 5. User-Mode Linux. Jeff Dike. November 7, Operating Systems Practical. OSP Lecture 5, UML 1/33

Wave Relay System and General Project Details

User-Mode Linux. Jeff Dike. Abstract. 2 Devices. 1 Introduction

EXPLORING LINUX KERNEL: THE EASY WAY!

LSN 10 Linux Overview

Date: December 2009 Version: 1.0. How Does Xen Work?

CREW - FP7 - GA No Cognitive Radio Experimentation World. Project Deliverable D7.5.4 Showcase of experiment ready (Demonstrator)

x86 ISA Modifications to support Virtual Machines

Introduction to Passive Network Traffic Monitoring

Procedure: You can find the problem sheet on Drive D: of the lab PCs. 1. IP address for this host computer 2. Subnet mask 3. Default gateway address

TECHNICAL NOTE. Technical Note P/N REV 03. EMC NetWorker Simplifying firewall port requirements with NSR tunnel Release 8.

Embedded Linux Platform Developer

Performance Measurement of Wireless LAN Using Open Source

ZEN LOAD BALANCER EE v3.02 DATASHEET The Load Balancing made easy

Virtualization for Cloud Computing

Analysis of Open Source Drivers for IEEE WLANs

The QEMU/KVM Hypervisor

DL TC72 Communication Protocols: HDLC, SDLC, X.25, Frame Relay, ATM

BHyVe. BSD Hypervisor. Neel Natu Peter Grehan

Computer Systems and Networks. ECPE 170 Jeff Shafer University of the Pacific. Linux Basics

Cisco Certified Network Associate (CCNA) 120 Hours / 12 Months / Self-Paced WIA Fee: $

Introduction to Operating Systems. Perspective of the Computer. System Software. Indiana University Chen Yu

CS 3530 Operating Systems. L02 OS Intro Part 1 Dr. Ken Hoganson

Virtualization. Pradipta De

Testing & Assuring Mobile End User Experience Before Production. Neotys

Measuring Wireless Network Performance: Data Rates vs. Signal Strength

ZEN LOAD BALANCER EE v3.04 DATASHEET The Load Balancing made easy

Development of Type-2 Hypervisor for MIPS64 Based Systems

What You Will Learn About. Computers Are Your Future. Chapter 8. Networks: Communicating and Sharing Resources. Network Fundamentals

TYLER JUNIOR COLLEGE School of Continuing Studies 1530 SSW Loop 323 Tyler, TX

Implementing Intercluster Lookup Service

W2CBW0011u (Marvell 88W8786 based Wi-Fi b/g/n 1 x1 Module, Chip Antenna) Development Kit Quick Start Guide V1.10

Introduction to Operating Systems

Module I-7410 Advanced Linux FS-11 Part1: Virtualization with KVM

MuL SDN Controller HOWTO for pre-packaged VM

Android Development. Lecture AD 0 Android SDK & Development Environment. Università degli Studi di Parma. Mobile Application Development

Router Architectures

: Interconnecting Cisco Networking Devices Part 1 v2.0 (ICND1)

A Transport Protocol for Multimedia Wireless Sensor Networks

COMMANDS 1 Overview... 1 Default Commands... 2 Creating a Script from a Command Document Revision History... 10

Red Hat Linux Internals

A Secure Intrusion detection system against DDOS attack in Wireless Mobile Ad-hoc Network Abstract

NETWORK EMULATION AND NETKIT

Sage ERP Accpac Online

Sage 300 ERP Online. Mac Resource Guide. (Formerly Sage ERP Accpac Online) Updated June 1, Page 1

Integrity Virtual Machines Technical Overview

Chapter 15: Advanced Networks

Adapt Support Managed Service Programs

Active Network Monitor

The installation of pylon for Linux is described in the INSTALL text document.

Copyright 1

CHAPTER 6. VOICE COMMUNICATION OVER HYBRID MANETs

Core Syllabus. Version 2.6 C OPERATE KNOWLEDGE AREA: OPERATION AND SUPPORT OF INFORMATION SYSTEMS. June 2006

How To Connect To Bloomerg.Com With A Network Card From A Powerline To A Powerpoint Terminal On A Microsoft Powerbook (Powerline) On A Blackberry Or Ipnet (Powerbook) On An Ipnet Box On

CCNA Discovery Networking for Homes and Small Businesses Student Packet Tracer Lab Manual

Last Class: OS and Computer Architecture. Last Class: OS and Computer Architecture

Models For Modeling and Measuring the Performance of a Xen Virtual Server

CS335 Sample Questions for Exam #2

Full and Para Virtualization

Networking 4 Voice and Video over IP (VVoIP)

CS 377: Operating Systems. Outline. A review of what you ve learned, and how it applies to a real operating system. Lecture 25 - Linux Case Study

Laboratory Exercises VII: Network Firewalls

Linux Network Security

SSVP SIP School VoIP Professional Certification

Operating Systems. Lecture 03. February 11, 2013

CCT vs. CCENT Skill Set Comparison

Università Degli Studi di Parma. Distributed Systems Group. Android Development. Lecture 1 Android SDK & Development Environment. Marco Picone

6LoWPAN Technical Overview

Quantifying the Performance Degradation of IPv6 for TCP in Windows and Linux Networking

Crystal Enterprise. Overview. Contents. Troubleshooting a Communication Error

The Lagopus SDN Software Switch. 3.1 SDN and OpenFlow. 3. Cloud Computing Technology

Kernel. What is an Operating System? Systems Software and Application Software. The core of an OS is called kernel, which. Module 9: Operating Systems

SSVVP SIP School VVoIP Professional Certification

Router and Routing Basics

LCMON Network Traffic Analysis

OS Virtualization Frank Hofmann

BASIC ANALYSIS OF TCP/IP NETWORKS

Applicazioni Telematiche

MCSE Core exams (Networking) One Client OS Exam. Core Exams (6 Exams Required)

How To Monitor And Test An Ethernet Network On A Computer Or Network Card

Outline. Outline. Why virtualization? Why not virtualize? Today s data center. Cloud computing. Virtual resource pool

User Mode Linux, VMWare and Wine

Interconnecting Cisco Networking Devices, Part 1 (ICND1) v3.0

Application of Android OS as Real-time Control Platform**

Oak Ridge National Laboratory Computing and Computational Sciences Directorate. Lustre Crash Dumps And Log Files

CompTIA Network+ (Exam N10-005)

Hitachi Virtage Embedded Virtualization Hitachi BladeSymphony 10U

Network Enabled Battery Health Monitoring System

KVM: Kernel-based Virtualization Driver

CPS221 Lecture: Operating System Structure; Virtual Machines

GregSowell.com. Mikrotik Basics

Using Virtual PC 7.0 for Mac with GalleryPro

VON/K: A Fast Virtual Overlay Network Embedded in KVM Hypervisor for High Performance Computing

Education & Training Plan IT Network Professional with CompTIA Network+ Certificate Program with Externship

Education & Training Plan IT Network Professional with CompTIA Network+ Certificate Program with Externship

Transcription:

Running virtualized native drivers in User Mode Linux V. Guffens, G. Bastin UCL/CESAME (Belgium) USENIX 05 / Freenix track Anaheim, USA, June 10-15, 2005 Running virtualized native drivers in User Mode Linux p.1/30

Outline Overview of User Mode Linux (UML) A wifi layer for UML Principle Architecture Applications wireless setup emulator Teaching tool http://www.unik.no/personer/paalee/ Running virtualized native drivers in User Mode Linux p.2/30

PART I Overview of User Mode Linux Running virtualized native drivers in User Mode Linux p.3/30

User Mode Linux Mainly developed by Jeff Dike Started in February 1999 (Registered at sourceforge in November 1999) UML architecture is described in papers found on the UML kernel home page (OLS 01, OLS 02) Integrated in the official Linux 2.6.9 tree Running virtualized native drivers in User Mode Linux p.4/30

Overview of User Mode Linux UML runs as a process ls ps netscape U M L Generic kernel Drivers Architecture Layer Hardware : CPU, disks, networks, terminal,... Running virtualized native drivers in User Mode Linux p.5/30

Overview of User Mode Linux Virtualised kernel, new Linux architecture ls ps netscape U M Generic kernel L ls ps netscape UML Drivers UML architecture Generic kernel Drivers Architecture Layer Hardware : CPU, disks, networks, terminal,... Running virtualized native drivers in User Mode Linux p.5/30

Overview of User Mode Linux No attempt to run an unmodified OS ls ps netscape U M Generic kernel L ls ps netscape UML Drivers UML architecture Generic kernel Drivers Architecture Layer Hardware : CPU, disks, networks, terminal,... Running virtualized native drivers in User Mode Linux p.5/30

Achieving virtualization System calls : 2 modes Tracing thread mode (tt) Separate Kernel Address Space (skas), requires a patch on the host Hardware is emulated UML block devices associated with a file on the host which contains a filesystem Interrupts are replaced by signals network devices use a hub daemon on the host OR ethertap,... Running virtualized native drivers in User Mode Linux p.6/30

System calls tt mode One process on the host per process on UML + tracing thread process use ptrace syscall to intercept the UML syscall, nullify it run the syscall handler in UML kernel skas mode Only 4 process/uml on the host use a /proc/mm interface on the host to change address space Running virtualized native drivers in User Mode Linux p.7/30

Hardware emulation, example uml-gw: # cat /proc/interrupts CPU0 0: 2147 SIGVTALRM timer 2: 40 SIGIO console 3: 0 SIGIO console-write 4: 4906 SIGIO ubd 9: 0 SIGIO mconsole 10: 0 SIGIO winch, winch 11: 38 SIGIO write sigio Running virtualized native drivers in User Mode Linux p.8/30

PART II A wifi layer for UML Running virtualized native drivers in User Mode Linux p.9/30

UML-wifi Principle tcp connection { UML1 UML2 UML3 host1 Simulator server host2 UML is used to create virtual machines Machines are interconnected through a simulator server Running virtualized native drivers in User Mode Linux p.10/30

Needed components 1/2 Wireless Network interface with wireless extension in UML Write a specific UML driver similar to what exists now in UML Use an existing wireless driver and virtualize it Running virtualized native drivers in User Mode Linux p.11/30

Needed components 1/2 Wireless Network interface with wireless extension in UML Write a specific UML driver similar to what exists now in UML Use an existing wireless driver and virtualize it Use hostap driver Running virtualized native drivers in User Mode Linux p.11/30

Needed components 2/2 Physical layer Forward the packets from nodes to nodes Drops the packets when needed (probability loss model) graphical display Visualise what happens in the network Easily create an arbitrary topology Running virtualized native drivers in User Mode Linux p.12/30

The hostap driver (Jouni Malinen) Supports multiple hardware type PCI, PCMCIA Add a UML layer Supports a host AP mode in software Running virtualized native drivers in User Mode Linux p.13/30

Inserting the hostap driver in UML unresolved PCI related symbols in hostap_pci $ nm hostap_pci.o grep pci grep U U pci_disable_device U pci_enable_device U pci_register_driver U pci_restore_state U pci_save_state U pci_set_power_state U pci_unregister_driver + writew and readw Running virtualized native drivers in User Mode Linux p.14/30

Inserting the hostap driver in UML No PCI bus in UML Add a new virtual bus in UML : netbus Replace the PCI-dependent code of the hostap driver Running virtualized native drivers in User Mode Linux p.15/30

Inserting the hostap driver in UML $ nm hostap_uml.o grep netbus grep U U netbus_finish_interrupt U netbus_read_interrupt U netbus_readw U netbus_recv U netbus_register_device U netbus_request_irq U netbus_send U netbus_unregister_device U netbus_writew Running virtualized native drivers in User Mode Linux p.16/30

Interconnection with UML separated processes App. syscal Linux kernel code netbus tcp Virtual machine exported symbols new exported symbols hostap driver virtual external device Hostap driver can be inserted in UML Need to act on an emulated device Running virtualized native drivers in User Mode Linux p.17/30

Device emulation Simulator server written as a tcp server in QT/C++ Each device is and object instantiated when a connection is established driver may read and write word in device memory, status register is emulated A second tcp connection is used to send interrupt requests Running virtualized native drivers in User Mode Linux p.18/30

Physical layer emulator Each device has a 2D physical position (x, y) Empirical and theoretical models are available for path lost against distance Packet error rate may be calculated with Signal-to-Noise ratio depending on the digital modulation Include a mobility model Running virtualized native drivers in User Mode Linux p.19/30

Simulator architecture UML machine hostap driver tcp client1 netbus virtual wireless card UML machine hostap driver tcp clientn virtual wireless card Wireless network Physical layer emulation netbus Network visualisation window simulation server Running virtualized native drivers in User Mode Linux p.20/30

Demo See the video Visualisation toolbar Mobile nodes Fixed nodes Running virtualized native drivers in User Mode Linux p.21/30

PART III Applications Running virtualized native drivers in User Mode Linux p.22/30

A testbed environment 1/4 testing Ad hoc On-Demand Distance Vector Routing uml6 tries to ping uml3 uml6 uml5 uml3 Setup runs for hours (with mobile nodes) Connectivity is broken Running virtualized native drivers in User Mode Linux p.23/30

A testbed environment 2/4 Troubleshooting uml6 tries to ping uml3 uml6 uml5 uml3 Route Table at uml6 ---------------------------------------------- IP Seq Hop Count Next Hop ---------------------------------------------- 192.168.0.2 1 1 192.168.0.2 192.168.0.5 1 1 192.168.0.5 192.168.0.6 1 0 192.168.0.6 ---------------------------------------------- Running virtualized native drivers in User Mode Linux p.24/30

A testbed environment 3/4 Troubleshooting uml6 tries to ping uml3 uml6 uml5 uml3 Route Table at uml3 ---------------------------------------------- IP Seq Hop Count Next Hop ---------------------------------------------- 192.168.0.7 1 1 192.168.0.7 192.168.0.6 1 1 192.168.0.6 192.168.0.5 1 1 192.168.0.5 192.168.0.3 1 0 192.168.0.3 ---------------------------------------------- Running virtualized native drivers in User Mode Linux p.25/30

A testbed environment 4/4 Troubleshooting uml6 uml5 uml3 transmission power of UML3 > UML6 Classical asymmetric link problem Running virtualized native drivers in User Mode Linux p.26/30

Development and testing All the software available in Linux may be used in a wireless environment Easily develop and test new solution example: name resolution in MANET (draft-engelstad-manet-name-resolution-01) Uses a modified proxy dns server (dnrd) Running virtualized native drivers in User Mode Linux p.27/30

A teaching tool 1/2 Study the interactions between a driver and the kernel (ex. sending a command) driver enqueue(struct cmd) cmd_issue() outw interrupt driver prism2_interrupt() dequeue(cmd) cmd >callback() card acknowledge Running virtualized native drivers in User Mode Linux p.28/30

A teaching tool 2/2 (1) writew(0x10,0x4) write param0 in PARAM0_OFF(0x4) (2) writew(0x0,0x8) write parma1 in PARAM1_OFF(0x8) (3) writew(0x10b,hfa384x_cmd_off) write the command in command register the frame + header previously stored in card memory at address param0:param1 (0x1000) is sent (4) Interrupt evstat=0x18,inten=0xe09f sent the interrupt to the processor (5) readw(0x60) read the event status register (6) readw(0x64) verify if interrupt enable (7) writew(0x10,hfa384x_evack_off) acknowledge cmd (8) Interrupt evstat=0x8,inten=0xe09f (9) writew(0x8,hfa384x_evack_off) acknowledge alloc Running virtualized native drivers in User Mode Linux p.29/30

Conclusion and future work Conclusion Highly realistic simulations Good teaching and development tool Running virtualized native drivers in User Mode Linux p.30/30

Conclusion and future work Conclusion Highly realistic simulations Good teaching and development tool Future work Add more features (AP mode, rate limitation,... ) More stable code Running virtualized native drivers in User Mode Linux p.30/30

Conclusion and future work Conclusion Highly realistic simulations Good teaching and development tool Future work Add more features (AP mode, rate limitation,... ) More stable code Thank you! Running virtualized native drivers in User Mode Linux p.30/30