On Sat, Nov 19, 2016 at 02:37:45PM +0100, Luca dariz wrote: > I was thinking about what kind of memory addresses should be allowed to > be translated to physical addresses from user-space drivers, for example > based on rump kernel. > Obviously memory allocated with vm_allocate_contiguous from dde patch, > so from the DIRECTMAP segment and of type VM_PT_KERNEL. Are there other > possibilities or other parameters to check?
The two major types of memory are anonymous and "file", where file means that a memory object isn't backed by the default pager. These shouldn't be affected by what you're trying to do. Other than that, device memory can easily become driver-specific. And by the way, please ignore the VM_PT_XXX types, they're not actually used. > I am thinking about adding an rpc to handle vitual to physical > translations (instead of using the debug interface) and maybe rework the > vm_allocate_contiguous rpc to not give the physical address, making it > similar to vm_allocate. What we'd rather have is something like hugetlbfs, where contiguous physical memory is backed by a pager (probably in the kernel), and applications would use vm_map to get access. -- Richard Braun

