indicogniBuild a VMM

Lab

Cache views

Used in chapter 13, the caches primer.

Write guest RAM from the VMM or an MMU-off guest, then clean or invalidate cache lines and see who reads stale data and which operation can lose a write.

Runs in browser
Two observers of one guest RAM line The VMM writes 0x4D through its write-back cache, so the line sits dirty in the cache while RAM still holds 0x00. The guest, with its MMU off, reads RAM around the cache and gets the stale 0x00. Cleaning the line to the Point of Coherency writes 0x4D to RAM and fixes the guest's read. In the other direction, a guest write goes straight to RAM, the VMM's cached copy becomes stale, and invalidating the line fixes the VMM's read. Invalidating a dirty line instead of cleaning it throws the VMM's write away. VMM cacheable map cache: 0x4D Dirty RAM: 0x00 the PoC guest reads 0x00 STALE write clean (DC CVAC) MMU off: around the cache Invalidate drops a dirty line: write lost.

All labs