The solutions that we described on how to virtualize memory in inode
clearly indicate that there is some degree of complexity and
overhead that have to be incurred by the due to virtualization.
Given the wide recognition that virtualization delivers important
benefits and it's been pointed out earlier in this lesson in that it
presented an important path to address some of the issues related to rising
operating costs in the IT industry.
The hardware companies responded and they modified their architectures
in a way that makes them more appropriate for virtualization.
In the x86 world these virtualization friendly architectures
started appearing around 2005.
Read AMD Pacifica and Intel Vanderpool Technology or LIntel-VT for short.
With respect to x86, so one of the first things that was fixed was to close
the holes with respect to those 17 non-virtualizable instructions, so
that they will cause a trap and pass control over in a privileged mode.
Also, the new protection mode was introduced.
So, as opposed to having just one protection mode with four ranks,
now there are two protection modes, so root and non-root.
Also referred to as host because this is the route is the mode in which the host
operating system, the hypervisor would run and the non route,
that's also referred to as guest which is where the guest VM would run.
Also, a support was added for the processor,
the hardware processor to understand and to be able to interpret information
that describes the state of the virtual processors called VCPUs.
This information is captured in a VM Control Structure or
also called a VM control block in the AMD x86 architectures.
The fact that the hypervisor understands how to interpret this data, so
it can walk this data structure is the term that's commonly used.
Means that it can specify whether or not a system call should trap.
So, it's easy for the hypervisor to know that a particular
type of operation should not cause a trap into root mode and
instead should be handled by the privilege layer in the non-root mode, so
the privilege layer in the non-root mode is the operating system.
Then other pieces of information,
then that in a certain way can help reduce the virtualization overhats.
The next step in terms of virtualization related advances was to make it
easier to manage memory.
Since hardware was already able to understand the presence of different
VMs, the next step here involved tagging the memory structures used by
the hypervisor with the corresponding VM identifiers.
So this led to support for extended page tables where the page table entries
now include information about the VMI team and also tagged TLBs.
What this means is that if there is a context switch am, among VMs that's also
called the world switch, when we're switching from one VM to another.
We don't have to flush or
invalidate those entries that are in the TLB that belong to the previous VM.
This is because the MMU, when it performs a check against
the TLB entries will try to match both the virtual address that is
causing the access request as well as the VM identifier.
And if they both match,
then it will proceed with the address that's specified in the TLB entry.
Otherwise, it will deal with the page fault failures.
As a result, context switches are now much more efficient.
Hardware was also extended to add better support for IO virtualization and
this included modifications both to the processor and the chipset side.
And also device and system interconnect capabilities that were introduced in
order to support this.
Some examples of these features include things like multiqueue capabilities on
the device and you can think of this as the device having multiple logical
interfaces where each interface can be used by a separate VM.
And also better support of interrupt routing, so
that when a device needs to deliver an interrupt to a specific VM, it actually
interrupts the core where that VM is executing and not some other CPUs.
Additional virtualization related hardware features were also included for
stronger security guarantees that now can be made to the VMs and
also to protect VMs from one another as well as from the hypervisor.
And also, features for better management support or for more efficiently to be
able to perform various management operations in virtualized environments.
You can think of this as more virtualization friendly
management interfaces.
Also, a number of new instructions were added to x86 in order to actually
exercise all of these new features.
For instance,
a new instruction was introduced to transition from one mode to another.
Basically, to transition from root mode or to return control to non-root mode.
Or a new instructions to manipulate in certain ways
state that's in the per VM control data structure, etc.