有在最近的Linux内核,支持能够存储到内存复制本地DMA引擎在drivers/dma目录“DMA引擎”的API,检查它们是如何实现的:
menuconfig DMADEVICES
bool "DMA Engine support"
depends on HAS_DMA
help
DMA engines can do asynchronous data transfers without
involving the host CPU. Currently, this framework can be
used to offload memory copies in the network stack and
RAID operations in the MD driver. This menu only presents
DMA Device drivers supported by the configured arch, it may
be empty in some cases.
DMA引擎在多个硬件平台上实现,但不是在每台PC或服务器或SoC中实现。检查Kconfig中的选项,如INTEL_IDMA64“英特尔集成DMA ..英特尔Skylake PCH”,INTEL_IOATDMA“英特尔(R)I/OAT DMA引擎,出现在最新的英特尔至强芯片组中。
如果你问如何登记中断处理程序,告诉我们什么是你的(虚拟)总线,你的(虚拟)设备的连接方式(以及如何你没有实现虚拟设备)。和qemu's "edu" pci.c driver has some examples for PCI-compatible interrupts:request_irq(pci_irq, irq_handler, IRQF_SHARED, "pci_irq_handler0", &major)。