How to find the memory regions of a process used for DMA

In linux kernel, given a process and its virtual memory space, is there a way to find the memory regions that are mapped for DMA (Direct Memory Access)? Maybe from the flags of its vma_area_struct?

Thanks

Answers


Well, you could find out which pages are locked. But the fact that a page is locked does not necessarily imply that it is for DMA. If the DMA mappings are created by your driver, it is much easier to implement a proper book keeping instead of looking for DMA regions after-the-fact.


Need Your Help

C++: Are classes/structs ever initialized at compile-time?

c++ class struct initialization c++03

Let's say I write a class Foo with a constructor Foo(int).

how to properly configure error handling in template

django django-templates

I have a basic form that I'm rendering in template using standard "{{ form.name_of_field.errors }} tags. When I try to submit an empty form, I expect to see the form re-rendered with "•field is req...