Messages in this thread | | | From | "Tian, Kevin" <> | Subject | RE: [PATCH 4/4] dmaengine: idxd: Use DMA API for in-kernel DMA with PASID | Date | Thu, 9 Dec 2021 02:06:27 +0000 |
| |
> From: Jiang, Dave <dave.jiang@intel.com> > Sent: Thursday, December 9, 2021 8:12 AM > >>> > >> Do you mean wq completion record address? It is already using DMA API. > >> wq->compls = dma_alloc_coherent(dev, wq->compls_size, > >> &wq->compls_addr, GFP_KERNEL); > >> desc->compl_dma = wq->compls_addr + idxd->data->compl_size * i; > > I would have expected something on the queue submission side too? > > DSA is different than typical DMA devices in the past. Instead of a > software descriptor ring where the device DMA to fetch the descriptors > after the software ringing a doorbell or writing a head index, the > descriptors are submitted directly to the device via a CPU instruction > (i.e. MOVDIR64B or ENQCMD(S)). The CPU takes the KVA of the 64B > descriptor and writes to the device atomically. No DMA mapping is > necessary in this case. >
To be accurate, the cpu reads the 64B descriptor from KVA and then write the descriptor to the device atomically.
| |