Check out the new USENIX Web site. next up previous
Next: Virtualizing a Network Card Up: A Hosted Virtual Machine Previous: A Hosted Virtual Machine

Virtualizing I/O Devices

Every VMware virtual machine is configured from the same set of potential virtual devices. Supported are standard PC devices such as a PS/2 keyboard, PS/2 mouse, floppy drive, IDE controllers with ATA disks and ATAPI CD-ROMs, a Soundblaster 16 sound card, and serial and parallel ports. Each virtual machine can also populate its virtual PCI slots with virtual BusLogic SCSI controllers, AMD PCNet$^{\sc tm}$ Ethernet adapters, and an SVGA video controller for a special VMware virtual display card. Note that since the hardware besides the SVGA controller is made up of standard PC devices, existing guest operating system device drivers can communicate with it without modification.

Figure 3: VMware's network subsystem provides virtual Ethernet adapters, hubs and bridges. A hub can be either be bridged to a physical Ethernet adapter, or connected to a virtual network interface in the host OS. The virtual bridge and hub are implemented via a VMNet driver that is loaded into the host OS.
\begin{figure*}\centerline{\psfig{figure=figures/vnet.eps,width=5.2in}}\end{figure*}

In order to virtualize an I/O device, the VMM must be able to intercept all I/O operations issued by the guest operating system. On a PC, those accesses are generally done via special privileged IA-32 IN and OUT instructions. These are trapped by the VMM and emulated either in the VMM or the VMApp by software that understands the semantics of the specific I/O port accessed. Any accesses that interact with the physical I/O hardware must be handled in the VMApp, but the VMM can potentially handle accesses that do not interact with the hardware, e.g., status ports or ports that merely latch data that will be used later. Restricting virtual devices to only a subset of available PC hardware greatly reduces the number of I/O ports that must be handled and the breadth of possibilities that handlers need to understand.

Virtualizing I/O devices with the hosted architecture can incur overhead from world switches between the VMM and the host, and even from the expense of handling the privileged instructions used to communicate with the hardware. However, these overheads matter only for devices with either high sustained throughput or low latency. The keyboard, for example, is perfectly suited to hosted virtualization.


next up previous
Next: Virtualizing a Network Card Up: A Hosted Virtual Machine Previous: A Hosted Virtual Machine
Beng-Hong Lim 2001-05-01