indicogniBuild a VMM

Lab

Guest address translator

Used in chapter 04.

Build a region table, hand the VMM a guest address and a length, and see whether it forms a host pointer, refuses, or (with a wrapping addr + len) reaches memory outside guest RAM.

Runs in browser
Guest address translator: the opening puzzle One RAM region from 0x4000_0000 to 0x4400_0000, host base H. Checked: 8 bytes at 0x4000_1000 end at 0x4000_1008, ok, host address H + 0x1000. Checked: 8 bytes at 0xFFFF_FFFF_FFFF_FFFC overflow, checked_add returns None, fault, no host address. Wrapping: the same request sums to 0x4 after wrapping, the check passes, and the VMM forms H - 0x4000_0004, about 1 GiB below its RAM allocation. One region, 0x4000_0000..0x4400_0000, host base H mode addr len addr + len verdict host address checked 0x4000_1000 8 0x4000_1008 ok H + 0x1000 checked 0xFFFF_FFFF_FFFF_FFFC 8 overflow (None) fault none wrapping 0xFFFF_FFFF_FFFF_FFFC 8 0x4 (wrapped) "ok" H - 0x4000_0004 Dashed row: the check passes, but the host pointer lands about 1 GiB below the VMM's RAM allocation.

All labs