|
As background, we identify and compare three distinct types of virtualization layer (or VMM) software architectures in
this section (see Figure 1):
-
OS-hosted VMMs
-
Stand-alone hypervisor VMMs
-
Hybrid VMMs
Each of these styles of VMM software architecture has its pros and cons, and the choice often depends on the particular
requirements of a given usage model or market segment.
OS-hosted VMMs
One approach to VMM software architecture is to build on the infrastructure of an existing OS [3] [15]. Such OS-hosted
VMMs consist of a privileged ring-0 component (shown as the "VMM kernel" in Figure 1) that runs alongside the kernel of
the hosting OS, and that obtains control of system resources–such as CPUs and system memory–to create an execution
environment for one or more guest OSs. The VMM kernel context switches between host-OS and guest-OS state at periodic
intervals as dictated by scheduling policy, or whenever host-OS support is required (e.g., to service hardware
interrupts from a physical I/O device that is programmed by a host-OS device driver). Although the guest OS is allowed
to directly execute on a physical CPU and to directly access certain portions of host physical memory subject to the
control of the VMM kernel, any accesses to I/O devices are typically intercepted by the VMM kernel and proxied to a
second, user-level component of the VMM (shown in Figure 1 as a User-Level Monitor or ULM). The ULM runs as an ordinary
process of the host OS, and it contains virtual I/O-device models that service I/O requests from guest OSs. Device
models in the ULM call the facilities of the underlying host OS via its file system and networking and graphics APIs to
handle I/O requests from guest OSs.
An OS-hosted VMM architecture offers several advantages: the VMM can leverage any I/O device drivers that have been
developed for the hosting OS, which can significantly ease porting of the VMM to a range of different physical host
platforms. Further, the VMM can leverage other facilities of the host OS, such as code for scanning I/O busses, to
perform I/O resource discovery and to manage host platform power-management functions.
A disadvantage of an OS-hosted VMM is that it is only as reliable, available, and secure as the host OS upon which it
depends: If the host OS fails or must be rebooted (e.g., to install a software security patch), then all other guest OSs
must be taken out of service as well. An OS-hosted VMM is also subject to the CPU scheduling policies of the host OS,
which serves not only the VMM and its guest OSs, but also other applications running above the host OS. Depending on the
security, availability, or real-time quality-of-service requirements of a given usage model, these disadvantages may not
be acceptable, and alternative VMM software architectures may be warranted.
Stand-alone hypervisor VMMs
One such alternative approach is to structure the VMM as a stand-alone hypervisor that does not depend on a hosting OS
[4, 10, 11]. A hypervisor-style VMM incorporates its own I/O device drivers, device models, and scheduler.
A hypervisor-style VMM can fully control provisioning of physical platform resources, enabling it to provide scheduling
and quality-of-service guarantees to its guest OSs. An additional advantage of a hypervisor-based VMM is that the code
paths from guest OSs requests for I/O services to the actual physical I/O device drivers are typically shorter than in
an OS-hosted VMM, which requires I/O requests to traverse two I/O stacks, first that of the guest OS, and then that of
the host OS. Further, by controlling and limiting the size of the hypervisor kernel, the VMM can provide enhanced
security and reliability through a smaller trusted computing base (TCB) [5, 9].
The advantages of a hypervisor-style VMM come at the expense of limited portability, because the necessary I/O-device
drivers for any given physical platform must be developed to run within the hypervisor. More advanced system functions,
such as ACPI-based system power management–which are inherited from the host OS in a hosted VMM–must also be
reimplemented in a hypervisor-based VMM. While not as complex as a full modern OS, a mature hypervisor-based VMM can
grow to a significant size over time, gradually compromising some of the benefits noted earlier (e.g., improved security
through limiting the size of the TCB).
Hybrid VMMs
In an effort to retain some of the security and reliability benefits of hypervisor-style VMM architecture, while at the
same time leveraging the facilities of an existing OS and its associated device drivers as in an OS-hosted VMM, some
VMMs adopt a hybrid approach [6, 7, 9].
In a hybrid VMM architecture, a small hypervisor kernel (shown in Figure 1 as a µ-hypervisor) controls CPU and memory
resources, but I/O resources are programmed by device drivers that run in a deprivileged service OS. The service OS
functions in a manner similar to that of a host OS in that the VMM is able to leverage its existing device drivers.
However, because the service OS is deprivileged by the µ-hypervisor, and because it operates solely on behalf of the VMM
(i.e., it does not support other, arbitrary user applications), it is possible to improve the overall security and
reliability of the system.
While a hybrid VMM architecture offers the promise of retaining the best characteristics of hosted- and hypervisor-style
VMMs, it does introduce new challenges, including new performance overheads, due to frequent privilege-level transitions
between guest OS and service OS through the µ-hypervisor. Further, the full benefits of deprivileging a service OS are
only possible with new hardware support for controlling device Direct Memory Access (DMA) via the µ-hypervisor. As we
will see later, such hardware support is provided by VT-d.

Figure 1: VMM software architectures
|