Virtualization (The View from 20,000 Feet)

Posted on March 1, 2022

THE CRUX: HOW TO VIRTUALIZE THE MACHINE UNDERNEATH THE OS?

The virtual machine monitor must transparently virtualize the machine underneath the OS; what are the techniques required to do so?

Popek and Goldberg virtualization requirements

Sensentive Instructions

Control-sensitive

Update system state, e.g. change GDTR, direct access to PM, VMXON.

Behavior-senstive

Semeantics depends on the system state, e.g. visibility to IDT.

Popek and Goldberg First theorem

For any conventional third-generation computer, a virtual machine monitor may be constructed if the set of sensitive instructions for that computer is a subset of the set of privileged instructions.

Trap and Emulate

source: Operating Systems: Three Easy Pieces

VT-x

Virtual Machine Extensions

Life Cycle of VMM Software

source: Intel® 64 and IA-32 Architectures Software Developer Manuals

VMCS

What’s it?

A data structuwre which control the behavior of processor in VMX non-root mode and control VMX transitions.

source: Hardware and Software Support for Virtualization

What’s in it?

VMCS-Layout.pdf

KVM

Write your own hypervisor

source: Using the KVM API ​

Qemu

source: Hardware and Software Support for Virtualization

Next step

other virtualization techniques

source: Understanding Full Virtualization, Paravirtualization, and Hardware Assist

memory virtualization

interupt virtualiazation

more platforms

virtualization on platforms whose ISA does not support virtualisation

performance

static partition virtualization

OS-level virtualization

para-virtualization

emulation