Download presentation
Presentation is loading. Please wait.
1
Virtualization D. J. Foreman 2009
2
Reference Formal Requirements for Virtualizable Third Generation Architectures, Gerald Popek and Robert Goldberg, CACM, V17 N7, July 1974 D. J. Foreman 2009
3
Advantages Resource configuration (RAM, devices, etc)
Run multiple (different) O/S’s concurrently Test new releases Isolation Scalability (multiprocessor systems) D. J. Foreman 2009
4
Modes of Operation Full simulation (NOT a true VMM) Hybrid VM
i.e.; instructions do not run natively Hybrid VM I/O resources are programmed by device drivers that run in a deprivileged service OS VMM (often called a hypervisor) large % of inst’s run natively All privileged instructions trap to VMM for emulation ©D. J. Foreman 2009
5
Types Full Virt. Paravirtualization H/W assisted 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 D. J. Foreman 2009
6
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 ©D. J. Foreman 2009
7
“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 ©D. J. Foreman 2009
8
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 ©D. J. Foreman 2009
9
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. ©D. J. Foreman 2009
10
VMM Types Type I runs directly on real hardware. Type II Hybrid
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 ©D. J. Foreman 2009
11
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” ©D. J. Foreman 2009
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.