Does MHI driver support DMA remapping?
A message that is not in the archive (sent off-list or not yet received): [email protected]
Hi Slark,
Quoted 8 lines · Slark Xiao
Hi,
I have a question about the DMA feature on our MHI driver. Does MHI support DMA remapping feature? This is the reference description from Windows OS:To ensure compatibility with Kernel DMA Protection and DMAGuard Policy, PCIe device drivers can opt into Direct Memory Access (DMA) remapping.
DMA remapping for device drivers protects against memory corruption and malicious DMA attacks, and provides a higher level of compatibility for devices. Also, devices with DMA remapping-compatible drivers can start and perform DMA regardless of lock screen status.
I assume this is all about IOMMU? then AFAIK it should be supported by the driver, not because the driver does anything special to handle it, but because it uses the standard dma helpers. So if there is an IOMMU in between, indicated in e.g. devicetree or ACPI, the different device IOVA spaces will be managed/isolated automatically via the IOMMU layer/driver.
Regards,
Loic
Quoted 19 lines · Loic Poulain
Hi Slark,
Quoted 8 lines · Slark Xiao
Hi,
I have a question about the DMA feature on our MHI driver. Does MHI support DMA remapping feature? This is the reference description from Windows OS:To ensure compatibility with Kernel DMA Protection and DMAGuard Policy, PCIe device drivers can opt into Direct Memory Access (DMA) remapping.
DMA remapping for device drivers protects against memory corruption and malicious DMA attacks, and provides a higher level of compatibility for devices. Also, devices with DMA remapping-compatible drivers can start and perform DMA regardless of lock screen status.
I assume this is all about IOMMU? then AFAIK it should be supported by the driver, not because the driver does anything special to handle it, but because it uses the standard dma helpers. So if there is an IOMMU in between, indicated in e.g. devicetree or ACPI, the different device IOVA spaces will be managed/isolated automatically via the IOMMU layer/driver.
Quoted 2 lines
Regards,
Loic
Hi Loic,
Thanks for your great explanation.
And I have one more concern, until now, we still don't know how to use the diag port "wwan0qcdm0".
It doesn't like Qualcomm traditional USB diag port that we can use QXDM (though this is a non-open tool and seems only accept USB diag port) or some other serial tool to collect debug log. Is there any method to collect debug log based on this port?
Thanks!