CSE Roadmap

Core tier · about 3 hours · 6 parts

Part 1 of 6 · 1 min read

Why this page comes third

In this module you will

  • Compare emulated devices, paravirtual (virtio) devices and device passthrough.
  • Explain how a virtqueue lets a guest and a hypervisor exchange requests with few exits.
  • Count the exits for a workload under two designs.
  • List the virtio devices of a Linux guest and name the driver of each.
  • Say what an IOMMU and SR-IOV add to passthrough.

Page 1 showed that a trap costs thousands of cycles, and page 2 handled the processor and memory. A guest also needs a disk and a network card. This page uses the device model of Level 8 (registers, interrupts, DMA, the driver stack) and the I/O path of the file system of Level 9. It asks which of these steps can be made without a trap. Page 4 then leaves virtual machines and turns to containers, which use the host's drivers directly.

About this example About this example

Real: The C program was compiled with gcc -Wall -Wextra and run on the Linux test machine (a KVM guest, kernel 6.18). The ten virtio devices and their drivers are real output from it.

Scripted: The cost of 5 microseconds per exit, the batch of 32 requests and the 100,000 requests per second are made up to show the idea.

Not real: The test machine hides its hardware, so passthrough and SR-IOV are described from the books and not shown.