Processor deep dive

The CPU does not “pretend.” It enters a controlled guest mode.

VT-x and AMD-V add hardware state for entering a guest, running ordinary instructions directly and returning to the hypervisor when configured events require intervention.

Execution cycle

VM-entry, direct execution, VM-exit.

The hypervisor prepares guest control state and enters the virtual CPU. The processor runs guest instructions until an event configured for interception occurs. It then saves guest state, reports an exit reason and resumes the hypervisor.

A VM-exit is not limited to privileged instructions.

Configured I/OCPUIDSelected MSRsInterrupt windowsEPT/NPT faultsDebug eventsHypercallShutdown

Which events exit depends on the VMM’s control settings. Reducing unnecessary exits is one reason paravirtual devices and careful CPU models matter.

One memory reference

Two page-table walks become one hardware-managed translation.

  1. Guest virtualAddress used by the guest process.
  2. Guest physicalGuest page tables produce the machine address the guest believes it owns.
  3. Host physicalEPT on Intel or NPT on AMD maps that address to real memory.
  4. TLBSuccessful translations are cached to avoid repeating the full walk.

Host evidence

# Linux
lscpu | grep Virtualization
grep -Eo 'vmx|svm' /proc/cpuinfo | head
dmesg | grep -Ei 'kvm|iommu'

# Windows PowerShell
Get-ComputerInfo -Property HyperVRequirement*

What hardware acceleration does not solve

Device model

A slow emulated disk or network device can dominate performance even when CPU execution is accelerated.

Scheduling

Too many runnable vCPUs still wait for physical CPU time.

Memory locality

EPT/NPT translates addresses; it does not guarantee NUMA-local placement.

Security policy

Mitigations, VBS and nested configurations can change behavior and overhead.