Pre-Virtualization Compiler Enhancements
- Forschungsthema:Virtual Machines
- Typ:Diplomarbeit
- Datum:31.01.2006
- Betreuung:
Prof. Dr. Frank Bellosa, Jan Stoess
- Bearbeitung:Raphael Neider
- Links:PDF
-
Abstract:
One problem common to all virtualization techniques is the efficient injection of emulation code into the guest operating systems (guest OSs). Emulation is needed to limit the effects of virtualization sensitive instructions to the appropriate virtual machine. For instance, privilege mode changes, processor halting or resetting, and device accesses must be redirected to the executing virtual machine rather than affect the underlying physical machine, as the latter is probably shared among multiple virtual machines. The emulation code will.in many cases.overwrite the contents of general purpose registers that would remain unmodified by the emulated sensitive instruction. These additional sideeffects must carefully be hidden from the guest OS to guarantee its correct execution.
The pre-virtualization approach uses a load-time rewriter to replace sensitive instructions with a sequence of code that saves all caller-saved registers, calls appropriate emulation code, and restores the saved registers afterwards. In many cases, this approach unnecessarily saves many registers whose content is afterwards discarded, thus increasing the virtualization overhead.
In this thesis we propose to use additional context-information for each sensitive instruction to facilitate generating more efficient replacement code: Live registers enable us to identify and discard irrelevant registers instead of preserving them across the emulation. Furthermore, literally known register content can help in statically selecting more specific emulation code, especially for device I/O.We also propose to use static rewriting techniques, such as register reallocation and rescheduling, to reduce the number of live caller-saved registers at the sensitive instructions.
All presented techniques will be integrated into an advanced rewriting system, which automatically extracts the required information from the pre-virtualized guest OS binary, performs the supporting static rewriting, and implements efficient load-time rewriting routines.
Our implementation for IA-32 shows that the use of context-information reduces the number of preserved registers during the emulation of sensitive instructions by more than 40 % for current Linux kernels.
BibTex:
@diplomathesis{neider06pvirtcompenh,
author = {Raphael Neider},
title = {Pre-Virtualization Compiler Enhancements},
type = {Diploma Thesis},
address = {System Architecture Group, University of Karlsruhe, Germany},
month = jan # "~31",
year = 2006
}