Hardware-assisted virtualization

Also known as: Intel VT-x · AMD-V

On this page 7

Hardware-assisted virtualization is a form of virtualization in which the processor itself provides dedicated instructions, execution modes and data structures that let a hypervisor run unmodified guest operating systems safely and efficiently. The best-known implementations are Intel VT-x and AMD-V on x86 processors, with equivalent extensions on Arm and other architectures.

Before these extensions appeared in 2005 and 2006, x86 hypervisors had to rely on binary translation or paravirtualization because the classic x86 instruction set was not fully virtualizable. Hardware assistance moved the hardest parts of that work into silicon and became the foundation of every modern cloud platform.

Why x86 needed hardware support

The original x86 architecture violated the Popek and Goldberg virtualization requirements of 1974, which state that every sensitive instruction must trap when executed in a less privileged mode. About 17 sensitive x86 instructions, such as POPF and SGDT, silently behaved differently instead of trapping, so a guest kernel moved to a lower ring could misbehave without the hypervisor noticing.

Early products solved this in software. The following table contrasts the main approaches that existed before and after hardware assistance.

ApproachHow sensitive instructions are handledGuest modification
Binary translationHypervisor rewrites guest kernel code at run timeNone
ParavirtualizationGuest kernel calls the hypervisor through hypercallsRequired
Hardware-assisted virtualizationCPU traps them into a dedicated root modeNone
Hybrid approachHardware traps plus paravirtual drivers for I/ODrivers only
Approaches to virtualizing x86

How Intel VT-x and AMD-V work

Hardware-assisted virtualization introduces two CPU operating modes: a privileged root mode for the hypervisor and a non-root mode for guests. In VT-x terminology these are VMX root and VMX non-root operation; AMD-V calls the facility Secure Virtual Machine (SVM). Each mode keeps its own rings 0 to 3, so a guest kernel runs in ring 0 without being able to control the real hardware.

The hypervisor describes each virtual CPU in an in-memory control structure, the VMCS on Intel or the VMCB on AMD. It stores guest and host register state and a set of controls that decide which events cause a VM exit, a transfer of control from the guest to the hypervisor. After handling the event, the hypervisor resumes the guest with a VM entry instruction such as VMRESUME or VMRUN.

The table lists the core components of the mechanism and their purpose.

ComponentIntel nameAMD namePurpose
Virtualization modeVMXSVMSeparates hypervisor from guest execution
Control structureVMCSVMCBHolds per-vCPU state and exit controls
Second-level pagingEPTNPT (RVI)Translates guest physical to host physical memory
Address space taggingVPIDASIDAvoids TLB flushes on world switches
I/O virtualizationVT-dAMD-ViIOMMU for device assignment and DMA isolation
Interrupt virtualizationAPICvAVICDelivers interrupts with fewer VM exits
Core building blocks of CPU virtualization extensions

Generations of hardware assistance

Hardware assistance evolved in distinct generations, and each one removed a major source of overhead. First-generation VT-x and AMD-V only virtualized the CPU; memory translation still required shadow page tables maintained by the hypervisor, which caused frequent and expensive VM exits.

GenerationKey featureMain benefit
First (2005 to 2006)CPU modes and control structuresUnmodified guests without translation
Second (2008 onward)EPT and NPTEliminates shadow page table overhead
ThirdVT-d, AMD-Vi and SR-IOVNear-native I/O through device assignment
FourthAPICv, AVIC and posted interruptsLower interrupt latency
CurrentMemory encryption (SEV-SNP, TDX)Guests protected from the hypervisor
Evolution of hardware virtualization features

Second-level address translation was the turning point for memory-intensive workloads. It adds a second page walk, which can raise TLB miss cost, but large pages of 2 MB or 1 GB largely offset that penalty in practice.

Hardware assistance across hypervisors and architectures

Practically every current hypervisor requires or strongly prefers hardware assistance. KVM depends on VT-x or AMD-V entirely, while VMware ESXi, Hyper-V, Xen in HVM mode and Firecracker all build on the same extensions, whether they are Type 1 or Type 2 hypervisors.

Outside x86, the Arm architecture provides a dedicated hypervisor exception level, EL2, together with stage-2 translation, which plays the role of EPT. IBM mainframes and POWER systems had hardware-assisted virtualization decades earlier, and the RISC-V hypervisor extension follows a similar model.

Nested virtualization, running a hypervisor inside a virtual machine, is also hardware-assisted. Features such as VMCS shadowing let the outer hypervisor handle the inner hypervisor’s control operations with far fewer exits, which makes nested setups usable for testing and cloud labs.

Performance factors and common mistakes

Hardware assistance makes CPU-bound workloads run at roughly 95 to 99 percent of native speed, but the remaining overhead concentrates in VM exits. Workloads with heavy I/O, frequent timer interrupts or many system calls that touch emulated devices suffer most.

SymptomLikely causeFix
Hypervisor refuses to start VMsVT-x or AMD-V disabled in firmwareEnable virtualization in BIOS or UEFI
High latency on network trafficEmulated network cardUse virtio drivers or SR-IOV
Poor memory performanceLarge pages disabledEnable huge pages on the host
Device passthrough failsIOMMU not enabledTurn on VT-d or AMD-Vi
Slow nested guestsNo VMCS shadowing or nested pagingUse newer CPUs and enable nesting
Typical problems and their fixes

Security is another consideration. Hardware isolation is strong, but side-channel vulnerabilities such as L1TF and other speculative execution flaws showed that guests sharing a physical core can leak data, which led many providers to disable simultaneous multithreading for untrusted tenants or to schedule cores per tenant.

The simple explanation

A computer normally assumes it has one operating system in charge. Running several at once is like letting several drivers share one car while each believes it is alone at the wheel.

Without help, the supervising software must watch every move and quietly correct it, which is slow. Hardware-assisted virtualization builds that supervision into the processor itself: the chip notices when a guest system tries something sensitive and hands control to the supervisor automatically. The result is that many virtual computers can run on one machine almost as fast as a real one.

How it is used in practice

A mid-sized software company runs its build and test pipeline on a cluster of eight two-socket servers with 64 cores each. Engineers notice that new test virtual machines refuse to start on two recently delivered servers, and the KVM log reports that hardware virtualization is unavailable.

An administrator checks the firmware settings and finds that Intel VT-x and VT-d were disabled at the factory. After enabling both, together with 1 GB huge pages on the host and virtio network drivers in the guests, the servers join the pool.

The team then measures a typical compilation job: inside a virtual machine it takes 412 seconds, compared with 398 seconds on bare metal, an overhead of about 3.5 percent. Hardware assistance lets the company consolidate workloads without a noticeable slowdown, and enabling the IOMMU also allows a GPU to be assigned directly to one test VM.