A Linux kernel framework for synthetic PCIe device emulation entirely in userspace. What is PCIem? PCIem is a framework that creates virtual PCIe devices in the Linux kernel by leveraging a few novel techniques to populate synthetic cards as legitimate PCI devices to the host OS. To brief what PCIem is: a framework for developing and testing PCIe device drivers without requiring actual hardware. Architecture ββββββββββββββββββββββββββββββββββββββββββββ ββββββββββββββββββββββββββββββββββββββββββββββββββββ β β β β β βββββββββββΊHost Linux Kernel β β Linux Userspace β β β β β β β β β β β β β ββββββββββββββββββββββββββββββ β β ββββββββββββββββββββββββββββββββββββββββββ β β β β PCIem Framework ββββββββΌβββββββββββββΊ/dev/pciemβββββββββββββΌβββββΊ Userspace PCI shim β β β β β β β β β β β β β β - PCI Config Space β β β β - Emulates PCIe device logic β β β β β β β β β β β β β β - BAR Mappings β β β ββββββββββββββββββββββββββββββββββββββββββ β β β β β β β β β ββββββ€ - INT/MSI/MSI-X Interrupts β β β β β β β β β ββββββββββββββββββββββββββββββββββββββββββββββββββββ β β β - DMA (With/without IOMMU) β β Userspace β β β β β β β β - P2P DMA β β β β β β β β β ββββββββββββββββββββββββββββββ β β β β β β β β β PCIe driver is unaware of PCIem β β β β β β β β β ββββββββββββββββββββββββββββββββββββ β β β β Real PCIe Driver β β β β β β β β βββ€ - Untouched logic from productionβ β β β β β β ββββββββββββββββββββββββββββββββββββ β β β ββββββββββββββββββββββββββββββββββββββββββββ Kernel Space Current Features BAR Support : Register and manage BARs programmatically : Register and manage BARs programmatically Watchpoints : Event-driven architecture using CPU watchpoints for access detection : Event-driven architecture using CPU watchpoints for access detection Legacy IRQ/MSI/MSI-X Support : Full interrupt support with dynamic triggering : Full interrupt support with dynamic triggering PCI Capability Framework : Modular PCI capabilities system (Linked-list underneath) : Modular PCI capabilities system...
First seen: 2026-01-20 09:33
Last seen: 2026-01-20 10:33