Hi,

We're working on a user space debugger for AMDGPU devices and are trying to figure out a "proper" way of taking mapped pages and converting them back to physical addresses so the debugger can read memory that was sent to the GPU.

The debugger largely operates at arms length from the application being debugged so it has no knowledge of the buffers other than which PCI device mapped it and the mapped address.

We also use the debugger to read back kernel programmed buffers (ring buffers and the like) so we really need a kernel level solution.

As a prototype I put a trace point in the AMDGPU driver when pci_map_page() is called which preserves the physical and dma address and that works but obviously is a bit of a hack and doesn't work if pages are mapped before the trace is enabled.

Ideally, some form of debugfs interface would be nice.

Is there any sort of interface already I can take advantage of? I've tried enabling the map/unmap tracepoints before loading amdgpu and it produced no traffic in the trace file.

Thanks,
Tom
_______________________________________________
iommu mailing list
[email protected]
https://lists.linuxfoundation.org/mailman/listinfo/iommu

Reply via email to