Virtualization technology enables a single computer
to run multiple operating systems and applications in independent
partitions. Both the AMD socket AM2 Athlon64 FX-62 and X2 5000+
processors support 'AMD Vitualization' technology in-chip. With
virtualization, a computer system can function as multiple “virtual” systems,
the in-chip hardware virtualization logic simply improves software
stability and performance.
As exciting as this all sounds, the tools necessary to
take advantage of this are absent from the desktop marketplace at the moment,
although software virtualization packages like VMware have been around for
years. Moving the capabilities of virtualization from software into hardware is
seen as a way to add flexibility into processors, which for the most part aren't
seeing demand increase in step with their clock speeds anymore.
Hardware Virtualization has its roots in Microsoft's
Palladium initiative, where it indefinitely stalled. Both Intel and AMD
have pressed ahead and implemented the feature support into the latest
generation of processors.
The main drawback of software virtualization is
that operating systems expect to have exclusive access to X86 architecture.
In programming geek talk, OS's require Ring 0 access because that's what the
hypervisor needs, and we all know the hypervisor is the master OS that hosts all
the virtual machines. Uh....right?
With modern X86 architectures, there are a total of
four ring levels, each of which gives less access to the hardware. For instance,
WindowsXP would run at Ring 0, while Microsoft Word would run at Ring 3. Less
access to the hardware makes sense since it means only the operating system has
control of vital systems.
Issues arise with conventional Virtual Machines when
vitalizing another system, because that software program is also
an operating system that is demanding Ring 0 access. As you can
imagine, sorting all this out is why virtualization in software has
not really trickled down to the desktop level.
To circumvent these issues in WindowsXP,
the hypervisor intercept's the Ring 0 code from the virtualized OS and emulates a response.
Unfortunately, this emulation requires a huge amount of
computing power, which when emulating an entire operating system can severely slow a
computer system down.
AMD's hardware Virtualization instructions build in
privileges beneath the Ring 0 level (essentially Ring -1) which is intended to
be used by the virtualization hypervisor. This way the virtualized
operating systems can get Ring 0 access without the need for the hypervisor to
interfere. It also improves performance as there will be less of a need for
software emulation, however it's not completely eliminated since the
hypervisor still needs to juggle the access to the memory controller and I/O
between each virtualized machine.
At the moment, this largely an academic exercise for
desktop users so let's move onto something affecting computer systems today
- energy efficiency.