Chapter 02 — 1972 — 1990s

VM/370 and the rules

IBM turned a research hypervisor into a product, and two researchers wrote down the conditions under which a machine can be virtualized at all. Both still shape every hypervisor you use.

On 2 August 1972, IBM announced VM/370. It was not a new idea — it was CP-67 with a product number, a support contract and a roadmap. But productization changed the stakes. Virtualization moved from a clever research system used by a few sites to an architecture IBM would maintain for the next half century. It also forced the industry to write down, precisely, what a hypervisor is allowed to assume about the machine underneath it.

VM/370: from research to product

VM/370 combined the Control Program (CP) with CMS and packaged them as a system that could run production workloads. The pitch was straightforward: one System/370 could host many virtual machines, each running its own operating system. A site could run CMS for interactive development, OS/VS1 or DOS/VS for batch, and a new release of an operating system in a sandbox — all on the same box.

Adoption was slower than the technology deserved. IBM's sales culture was oriented toward dedicated machines, and VM required operators to think about resource partitioning rather than one workload owning the hardware. By 1977 management was fully behind the product; by 1978 there were roughly a thousand VM installations. From there the line continued through VM/SP, VM/XA, VM/ESA and z/VM, which remains in support today and still runs guests that trace their lineage to CP-67.

Why it matters

VM/370 proved that a hypervisor could be a supported product with a stable interface, not just a research demo. The virtual machine became a deployment unit: an operator could boot, snapshot, migrate and bill one without touching the physical machine.

What a hypervisor actually has to do

Strip away the marketing and a hypervisor performs four jobs. The first is CPU virtualization: it must let a guest kernel execute privileged instructions without letting it control the real machine. The second is memory virtualization: it must give each guest a contiguous physical address space that is actually scattered across host memory, and keep guests out of each other's pages. The third is I/O virtualization: the guest sees disks, tapes, terminals and network interfaces that may be shared, emulated or passed through. The fourth is scheduling and accounting: virtual CPUs must be multiplexed onto real CPUs and charged to the right tenant.

Mainframes had an advantage that x86 would lack for decades: a clean distinction between supervisor state and problem state, and a set of privileged instructions that reliably trapped when executed in the wrong state. When a guest kernel tried to disable interrupts or modify the page tables, the CPU raised an exception. CP caught it, emulated the effect on the virtual machine's state, and resumed the guest. This is trap and emulate, and on a cooperative architecture it is both correct and reasonably fast.

The rules: Popek and Goldberg, 1974

Two researchers, Gerald Popek and Robert Goldberg, formalized the problem in a paper that every hypervisor developer still cites. They defined a virtual machine monitor as having three essential characteristics:

  1. Equivalence. A program running in a virtual machine should behave as it would on the real machine, apart from timing and the availability of resources.
  2. Resource control. The monitor must be able to control all system resources; a guest must not be able to escape its allocation.
  3. Efficiency. The vast majority of guest instructions must execute directly on the real processor, without intervention by the monitor.

They then classified instructions. Privileged instructions trap when executed in user mode: HLT, page-table loads, interrupt control. Innocuous instructions behave the same in user and supervisor mode: ordinary arithmetic, loads, stores. In between sit sensitive instructions — those that read or change privileged state, or whose behavior depends on the privilege level. A sensitive instruction is either control sensitive (it changes resource configuration) or behavior sensitive (its result depends on configuration).

The theorem is compact: an architecture is virtualizable if every sensitive instruction is a subset of the privileged instructions. If a sensitive instruction runs in user mode without trapping, the hypervisor never gets a chance to emulate it, equivalence breaks, and the guest can observe or corrupt state it should not.

ClassExample (x86)Traps in a guest?Consequence
PrivilegedHLT, MOV CR3, LGDTYes, if deprivilegedHypervisor can trap and emulate.
InnocuousADD, MOV, CMPNoExecutes directly at full speed.
Behavior sensitive, unprivilegedPOPF changing IFNo — silently ignoredGuest believes interrupts changed; they did not.
Control sensitive, unprivilegedSGDT, SIDT, STRNo — leaks real stateGuest can read the hypervisor's tables.

That last two rows are the x86 problem in miniature. The architecture had sensitive instructions that did not trap, which meant the theorem's condition failed. For more than two decades the standard answer was: don't virtualize x86. The next chapter explains why, and Chapter 4 explains who ignored the advice.

The mainframe's hardware assist: SIE

IBM did not rely solely on trap-and-emulate forever. Later System/370 processors added SIE — Start Interpretive Execution — an instruction that puts the CPU into a mode where it executes a guest until a defined intercept condition occurs. Instead of trapping on every sensitive instruction, the hardware runs the guest natively and exits only when the hypervisor's policy requires it.

SIE is conceptually the ancestor of Intel VT-x and AMD-V: move the guest/host boundary into silicon, define exactly which events cross it, and let the guest run at native speed in between. The mainframe industry had solved, in the 1970s, a problem the PC industry would not confront until the late 1990s.

Not just consolidation

It is tempting to read mainframe virtualization as a precursor to server consolidation, but the original workloads were different. VM/370 was used to:

  • run interactive CMS users alongside production batch;
  • test new operating system releases before deploying them on real machines;
  • provide compatibility environments for older software;
  • isolate departments that shared one expensive system but not their data;
  • develop and debug the operating system itself, since a crash in a guest did not take down the machine.

The last point became a cultural norm: "run it in a VM first." Modern CI pipelines, disposable test environments and snapshot-before-upgrade workflows are direct descendants of this practice.

The surprise: Linux on a mainframe

The strangest chapter in this story is the revival of the mainframe as a Linux platform. When IBM brought Linux to S/390 around 1999–2000, z/VM became a hosting layer for large numbers of Linux guests. A single modern mainframe can run hundreds or thousands of Linux images, each isolated like a separate server, sharing the machine's I/O subsystem. Virtualization invented to share a mainframe ended up keeping the mainframe relevant in the cloud era.

The trade-off that never goes away

Every virtualization technique buys isolation with indirection. Trap-and-emulate pays on every privileged instruction; binary translation pays on translated code; paravirtualization pays in guest modifications; hardware assist pays in CPU complexity and cache/TLB pressure. There is no free boundary — only a different bill.

Sources & further reading