Creating a custom PCI device in QEMU and a module for it in the Linux kernel.