Interest in virtualization technology is growing steadily as processor technology advances. One aspect of virtualization technology enables a single host computer running a virtual machine monitor (“VMM”) to present multiple abstractions and/or views of the host, such that the underlying hardware of the host appears as one or more independently operating virtual machines (“VMs”). Each VM may function as a self-contained platform, running its own operating system (“OS”) and/or a software application(s). The VMM manages allocation of resources on the host and performs context switching as necessary to cycle between various VMs according to a round-robin or other predetermined scheme.
The present invention is illustrated by way of example and not limitation in the figures of the accompanying drawings in which like references indicate similar elements, and in which:
Embodiments of the present invention provide a method, apparatus and system for a lightweight, application-specific virtual machine monitor. Reference in the specification to “one embodiment” or “an embodiment” of the present invention means that a particular feature, structure or characteristic described in connection with the embodiment is included in at least one embodiment of the present invention. Thus, the appearances of the phrases “in one embodiment,” “according to one embodiment” or the like appearing in various places throughout the specification are not necessarily all referring to the same embodiment.
VM 110 and VM 120 may function as self-contained platforms respectively, running their own “guest operating systems” (i.e., operating systems hosted by VMM 130, illustrated as “Guest OS 111” and “Guest OS 121” and hereafter referred to collectively as “Guest OS”) and other software (illustrated as “Guest Software 112” and “Guest Software 122” and hereafter referred to collectively as “Guest Software”). Each Guest OS and/or Guest Software operates as if it were running on a dedicated computer rather than a virtual machine. That is, each Guest OS and/or Guest Software may expect to control various events and have access to hardware resources on Host 100.
Within each VM, the Guest OS and/or Guest Software may behave as if they were, in effect, running on Host 100's physical hardware (“Host Hardware 140”). Host Hardware 140 may include all devices on and/or coupled to Host 100, such as timers, interrupt controllers, keyboards, mouse, network controller, graphics controller, disk drives, CD- ROM drives and USB devices. VMM 130 has ultimate control over the events and these hardware resources and provides emulation of all the devices, as required, for each VM hosted by VMM 130.
According to an embodiment of the present invention, a special-purpose virtual machine manager may be implemented to improve Guest OS performance. Specifically, according to an embodiment, the special-purpose virtual machine manager may allow one Guest OS untrapped (i.e., direct) access to any device that is not required by the other Guest OS on Host 100 and/or by VMM 130.
As illustrated in
According to one embodiment of the present invention, the devices that are exposed to Primary VM 210 may be provided as virtual devices to the secondary partition on Host 100 (e.g., Secondary Secondary VM 220). As illustrated in
In an alternate embodiment, a number of devices that are not assigned Primary VM 210 may be assigned directly to Secondary VM 220. Thus, for example, while the majority of devices on Host 100 may be assigned directly to Primary VM 210 and provided as virtual devices to Secondary VM 220, a minority of devices may be assigned directly to Secondary VM 220 and provided as virtual devices to Primary VM 210. Various allocation schemes may be practiced to optimize performance of Host 100 without departing from the spirit of embodiments of the present invention.
In one embodiment of the present invention, Guest OS 211 is assumed to be a Windows XP OS while Guest OS 221 is assumed to be a WinCE OS. According to this embodiment, Primary VM 210 remains the primary partition, and as a result, Windows XP may be the primary Guest OS while and WinCE may be the secondary Guest OS. All I/O devices on Host 100 other than the network interface card (“NIC 250”) may be “owned” by VM 210. Only motherboard resources required for the operation of the LVMM are hidden from Guest OS 211 in VM 210. According to one embodiment, these motherboard resources (e.g., NIC 250) may be provided as virtual resources to both Primary VM 210 and Secondary VM 220 (illustrated as VNIC 255 in both VMs). WinCE (Guest OS 221) may be used to host applications which add value to Host 100 through the execution of software on WinCE. Thus, for example, in one embodiment, a firewall program can be run on WinCE so that attacks on Primary VM 210 may be thwarted. According to an embodiment, LVMM 200's scheduling algorithm may also detect any crashes of Windows XP so that recovery software may be run on WinCE. It will be readily apparent to those of ordinary skill in the art that various such software applications may be run within the secondary partition (e.g., on WinCE) to improve the manageability of the primary partition (e.g., Windows XP).
According to an embodiment of the present invention, a few devices on Host 100 may still be virtualized, such as devices within Host 100 that are not typically visible to the user. In an alternate embodiment, NIC 250 may be virtualized despite the fact that the device is visible to the user. LVMM 200 may comprise enhancements made to an existing VMM and/or to other elements that may work in conjunction with an existing VMM. LVMM 200 may therefore be implemented in software (e.g., as a standalone program and/or a component of a host operating system), hardware, firmware and/or any combination thereof.
In one embodiment, LVMM may take advantage of features in Intel® Corporation's Virtual Technology computing environment (Intel® Virtualization Technology Specification for the IA-32 Intel® Architecture, April 2005, Intel® Virtualization Technology Specification for the Intel® Itanium Architecture (VT-i), Rev. 2.0, April 2005) but embodiments of the invention are not so limited. Instead, various embodiments may be practiced within other virtual environments that include similar features. According to an embodiment, VT provides support for virtualization with the introduction of a number of elements, including a new processor operation called Virtual Machine Extension (VMX). VMX enables a new set of processor instructions on PCs. In one embodiment, LVMM 200 may take advantage of VMX to identify and/or interact with the primary partition on Host 100. Further description of VMX and other features of VT are omitted herein in order not to unnecessarily obscure embodiments of the present invention.
According to an embodiment, Host 100 may include one primary VM and one or more secondary VMs. In the event Host 100 includes more than one secondary VM, as illustrated in
The hosts according to embodiments of the present invention may be implemented on a variety of computing devices. According to an embodiment of the present invention, computing devices may include various components capable of executing instructions to accomplish an embodiment of the present invention. For example, the computing devices may include and/or be coupled to at least one machine-accessible medium. As used in this specification, a “machine” includes, but is not limited to, any computing device with one or more processors. As used in this specification, a machine-accessible medium includes any mechanism that stores and/or transmits information in any form accessible by a computing device, the machine-accessible medium including but not limited to, recordable/non-recordable media (such as read-only memory (ROM), random-access memory (RAM), magnetic disk storage media, optical storage media and flash memory devices), as well as electrical, optical, acoustical or other form of propagated signals (such as carrier waves, infrared signals and digital signals).
According to an embodiment, a computing device may include various other well-known components such as one or more processors. The processor(s) and machine-accessible media may be communicatively coupled using a bridge/memory controller, and the processor may be capable of executing instructions stored in the machine-accessible media. The bridge/memory controller may be coupled to a graphics controller, and the graphics controller may control the output of display data on a display device. The bridge/memory controller may be coupled to one or more buses. One or more of these elements may be integrated together with the processor on a single package or using multiple packages or dies. A host bus controller such as a Universal Serial Bus (“USB”) host controller may be coupled to the bus(es) and a plurality of devices may be coupled to the USB. For example, user input devices such as a keyboard and mouse may be included in the computing device for providing input data. In alternate embodiments, the host bus controller may be compatible with various other interconnect standards including PCI, PCI Express, FireWire and other such existing and future standards.
In the foregoing specification, the invention has been described with reference to specific exemplary embodiments thereof. It will, however, be appreciated that various modifications and changes may be made thereto without departing from the broader spirit and scope of the invention as set forth in the appended claims. The specification and drawings are, accordingly, to be regarded in an illustrative rather than a restrictive sense.