3/3 Binary translation

Reading

Binary translation and recompilation—of machine instructions to machine instructions, or of a specialized instruction set to machine instructions—is an important technique for measurement, extensibility, and performance. We’ll read one paper about how binary translation was used in early versions of the VMware virtual machine monitor (advances in hardware technology have reduced the need for binary translation there), and one paper that leverages eBPF, binary translation infrastructure in the Linux kernel, to build fast kernel extensions.

An author of the second paper is giving a talk at Harvard on 3/4! Come to the talk if you can.

  1. “A comparison of software and hardware techniques for x86 virtualization”, Keith Adams, Ole Agesen (ASPLOS 2006)

  2. (Optional) Skim a background article about eBPF.

  3. “Fast, Flexible, and Practical Kernel Extensions”, Kumar Kartikeya Dwivedi, Rishabh Iyer, Sanidhya Kashyap (SOSP 2024)

Reading question

Binary translation as used in both VMware and KFlex gain performance by eliding security checks (e.g., bounds checks) when it is safe to do so, but their techniques for eliding checks differ. Compare and contrast these techniques. For instance, would any hardware features ease the implementation of KFlex? Do any KFlex ideas apply in the VMware context?