What is virtualization?
Virtualization allows concurrent execution of multiple operating systems (and their applications) on the same physical machine.
What are virtual resources?
Each OS thinks it “owns” hardware resources
What is a virtual machine (VM)?
OS + applications + virtual resources (called guest domain)
What is a virtualization layer?
management of physical hardware (virtual machine monitor, hypervisor)
What are the goals of a virtual machine monitor (VMM)?
What are the benefits of virtualization?
+ consolidation: decrease cost, increase manageability + migration: availability, reliability + security + debugging + support for legacy operating systems
What are the two main virtualization models?

Explain how processor virtualization (trap and emulate works).
What happens when the guest OS issues an instruction that’s non-privilaged? Privilaged?
Guest instructions are executed directly by hardware. The virtual machine monitor does not interfere with every instruction that’s issued by the guest OS or its applications.
Similarly, the hypervisor doesn’t interfere with non-privilaged operations. This allows instructions to execute at hardware speed, which is efficient.
For privilaged operations: trap to hypervisor
What were the problems with virtualizing x86?
x86 pre 2005
BUT: 17 privilaged instructions no not trap! fail silently!
e.g., interrupt enable/disable bit in privilaged register; POPF/PUSHF instructions that access it from ring fail silently
hypervisor doesn’t know, so it doesn’t try to change settings
OS doesn’t know, so it assumes change was successful
What is binary translation?
Rewrite the VM vinary to never use specific instructions that fail silently rather than cause a trap to the hypervisor. Pioneered by VMWare.
What is paravirtualization?
Modify guest OS so that:
How does memory virtualization work?
Full Virtualization
Option 1:
Option 2:
Paravirtualization
What is the pass-through model of device virtualization?
Pros/Cons?
VMM-level driver configures device access permissions
Pros
+ VM provided with exclusive access to the device
+ VM can directly access the device (VMM-bypass)
Cons

What is the hypervisor-direct model of device virtualization?
VMM intercepts all device accsses and emulates device operation:
Pros
+ VM decoupled from physical device
+ sharing, migration, dealing with specific devices
Cons

What is the split device driver model of device virtualization?
Pros/Cons?
Device access control split between front-end driver in guest VM (device API) and back-end driver in service VM (or host). Requires modified guest drivers so it’s limited to paravirtualized guests.
Pros
+ eliminate emulation overhead
+ allow for better management fo shared devices
Cons
-
