23.6.1.1. QEMU edu PCI device

Small upstream educational PCI device:

./qemu_edu.sh

This tests a lot of features of the edu device, to understand the results, compare the inputs with the documentation of the hardware: https://github.com/qemu/qemu/blob/v2.12.0/docs/specs/edu.txt

Sources:

Works because we add to our default QEMU CLI:

-device edu

This example uses:

  • the QEMU edu educational device, which is a minimal educational in-tree PCI example

  • the pci.ko kernel module, which exercises the edu hardware.

    I’ve contacted the awesome original author author of edu Jiri Slaby, and he told there is no official kernel module example because this was created for a kernel module university course that he gives, and he didn’t want to give away answers. I don’t agree with that philosophy, so students, cheat away with this repo and go make startups instead.

TODO exercise DMA on the kernel module. The edu hardware model has that feature: