Problem:
- The first version of Hardware support for Virtualization in x86 was introduced by Intel and AMD recently. The paper tries to see why the hardware support didn’t lead to improved performance in VMWare.
- The hardware support introduced isn’t compatible with the best software solution for x86 virtualization at the time. The paper compares hardware assisted virtualization with software only(BT) virtualization in VMWare.
- Problems associated with virtualizing x86 in general
- Leaking previlege information
- Missing features in user mode
What is Virtualization?
- Application should not know its running on the VM.
- Basic/Classical Requirements: Fidelity, Performance, Safety.
- New Criteria: Compatibility, Performance, Isolation, Encapsulation.(first three match the old criteria, encapsulation being the new one)
- Encapsulation: not a strict requirement for Virtualization. It implies not just mimicking the hardware but also that the VM can be easily moved. Example: in Clusters/Servers, the individual machines can have different OSes, versions, environment variables etc. which makes installing and running same app on all machines a difficult job for the administrator. If they all have VMM, it makes the job of running the same app on all of them much easier.
Why use a VM?
Virtualization is an alternative to running multiple processes or multiple instances of the same application on the same OS. Reasons why virtualization is preferred though it sacrifices performance are:
- Under utilized hardware.
- Ease of management, safety, easier to share distributed resources.
- Running the same app on multiple guest OSes or hardware configurations.
- Testing becomes much easier.
- If you don’t trust the guest OS, run the app in a VM. VMM is easier to verify since it has fewer lines of code.
Readers:
- Hardware and Software designers: Specific to the x86 architecture and the VMware method of Virtualization using Binary Translation.
Whats Unique about the paper:
- First paper to compare software-only and hardware-assisted VMMs. All previous work talks about either only hardware or only software methods of virtualization.
Types of Virtualization:
- Trap and Emulate: Run natively(in user mode) until privileged instructions are encountered or privileged state is accessed which causes a trap in the host machine.(this doesn’t work in x86 because of leaking privilege state information). This implementation would be typically slow since the latency of trapping, running the exception handler and emulating each time any kernel mode code is encountered is very high. But, having shadow structures can help reduce the number of traps that occur.
- Paravirtualization: This involves modifying parts of the guest OS to make it run on the VMM. The guest OS is thus aware that it is not running natively. Advantage is performance and disadvantage is lack of portability.
- Interpretation: Interpret every instruction. No instruction is run natively. This is very slow.
- Binary Translation: Interpret instructions when encountering them for the first time. Cache the translated Basic Blocks and apply chaining optimizations so that performance is improved. Most x86 Virtualization software like VMWare use this method.
- Hardware Assisted Virtualization: A new hardware guest mode(privilege level) is introduced for the VMM. New set of registers called Virtual Machine Control Block(VMCB) mimic the privileged state of the machine. Older IBM mainframes went further to include virtualized page translation as do the current versions of x86 virtualization
The claim made in the paper is that Hardware features introduced in x86 don’t help the Binary Translation approach to virtualization. The features were really meant to enable trap-and-emulate for x86.
Evaluation:
- Applications, targeted benchmarks. (targeted benchmarks are a relatively common technique. It helps to stress test, check extreme conditions.)
- Special Test OS(called FrobOS) was used to compare performance.
- The comparison of hardware version and software version was convincing.
- Strength: The targeted benchmarks implemented reinforce the observations that are made by running the popular benchmarks(SPEC).
- Weakness: Comparison was between an early h/w version and a mature s/w version, which is unfair.
- Its unclear if the hardware features were used optimally and by the VMWare software, and the hybrid scheme was a very early version.
