DMA is not happening to NVME when DMARemappingCompatible Flag is enabled on driver

Storport Miniport driver is installed based on number of NVME connected to system. A large chunk of WdfCommonbuffer is created on one of the instance and it is shared to other instances of driver for DMA to NVME. When DMARemappingCompatible is set to 1 , the DMA is working only on the instance where common buffer is created. On other two instances the data is read as zeroes. Anyway to solve this issue…?

That’s how it’s supposed to work, right? With DMA remapping, the address is unique to the driver.

1 Like

Agreed… Can’t this commonbuffer shared with other driver as well…?. This commonbuffer is mainly used between multiple NMVE for various purposes like caching. I tried to map the physical address( Get a physical address of common buffer by using virtual address) for other drivers by using DMA_IOMMU_INTERFACE_V2 functions but its not working.

I tried to join the same dma domain(JoinDmaDomain) in other drivers where common buffer created by using DMA_OPERATIOSN callback functions. But that also doesnt work. The function joinDma Domain return status as invalid parameter. Any information why JoinDmaDomain, LeaveDmaDoimain, AllocateDomainCommonBuffer functions are used…?

Hmmm… well, you don’t say HOW you’re undertaking this.

The who DMA Domain handling thing is currently not well documented. So, all we can really do at this point is experiment and guess, based on the function definitions and descriptions provided. HOWEVER… what IS clear is that there are several steps necessary to get multiple devices registered within a DMA Domain, and all these steps are (currently) WDM only. So, it’s not likely to be a matter of simply taking your WDF driver and calling “join this DMA domain” – it certainly seems to ME that you’d need to (currently) use a fully WDM DMA path in your code (which CAN, indeed, be added to your WDF driver).

But, as Mr. Roberts alluded to… the behavior you’re seeing is almost certainly by design. I think you’re looking in the right place by trying to use DMA Domains to solve your problem, but it sure looks to be more complicated than simply calling JoinDmaDomain from your WDF driver.

1 Like