110 likes | 206 Views
Virtualization. Reference . Formal Requirements for Virtualizable Third Generation Architectures, Gerald Popek and Robert Goldberg, CACM, V17 N7, July 1974 http://portal.acm.org/citation.cfm?id=361011.361073. Advantages. Resource configuration (RAM, devices, etc)
E N D
Reference • Formal Requirements for Virtualizable Third Generation Architectures, Gerald Popek and Robert Goldberg, CACM, V17 N7, July 1974 http://portal.acm.org/citation.cfm?id=361011.361073
Advantages • Resource configuration (RAM, devices, etc) • Run multiple (different) O/S’s concurrently • Test new releases • Isolation • Scalability (multiprocessor systems)
Modes of Operation • Full simulation (NOT a true VMM) • i.e.; instructions do not run natively • Hybrid VM • I/O resources are programmed by device drivers that run in a deprivilegedservice OS • VMM (often called a hypervisor) • large % of inst’s run natively • All privileged instructions trap to VMM for emulation
Types • Full Virt. • Guest unchanged • Generic device drivers • Paravirtualization • Guest can access host h/w • Modified drivers • H/W assisted • VMM moved to h/w • Requires virtualization h/w
VMM Management • Allocator - resource management • Dispatcher - determines post-trap action • Simulator • performs the instruction • limits effects to the VM • VM sees only its own machine
“Sensitive” i86 Instructions(in protected mode) • Control – can change amount of resources without causing a trap • Behavior – execution depends on real-memory location or mode • Includes: • IN - Input • OUTS - Output String • INS - Input String • CLI - Clear Interrupt-Enable Flag (IF) • OUT - Output STI - Set IF
Privileged i86 Instructions • include: • CLTS - Clear Task-Switched Flag • LMSW - Load Machine Status • HLT - Halt Processor • LTR - Load Task Register • LGDT - Load GDT Register • MOV CRn - Move Control Register • LIDT - Load IDT Register • MOV DRn - Move Debug Register • LLDT - Load LDT Register • MOV TRn - Move Test Register
V86 mode sensitive Inst’s • include: • CLI - Clear IF • POPF - Pop Flags • STI - Set IF • INT n - Software Interrupt • PUSHF - Push Flags • IRET - Interrupt Return • POPF is both IOPL and CPL sensitive. IOPL will only be changed by POPF when executed at CPL = 0. The interrupt flag (IF) will only be changed by POPF if executed with CPL <= IOPL. If POPF does not change IOPL or the interrupt flag due to lack of privilege, no exception is generated.
VMM Types • Type I runs directly on real hardware. • Type II • runs as an application on a host OS • relies on the host OS for • memory management, • processor scheduling, resource allocation, and • hardware drivers. • When a VM traps by attempt to execute a sensitive instruction, the host OS must direct the signal to the VMM • Hybrid • interprets every privileged instruction
X86 Problems • There are Sensitive, Unprivileged instructions • Do not cause an interrupt or exception! • Do not perform intended actions • Guest does not know they “failed”