Byunghyun Oh wrote: > I'm porting Plex86 x86 VM, which uses get_user_pages() function at > Linux-version kernel module to find and pin physical pages of memory > in user space (according to its documentation). I tried many > candidates as its replacement (PHYS_TO_VM_PAGE() macro in vm/vm_page.h > seems most useful now), but they haven't worked at all. > > Any experience about porting VM-related things in Linux will be > appreciated. :)
I've been unable to find any documentation on get_user_pages(), and you didn't provide a link to any. But looking at the source code, the reason for doing this is to permit DMA directly into user pages. I don't understand what you mean by "pin", in this context. You are aware that FreeBSD has a unified VM and buffer cache, and all user pages for the current process are automatically visible in th kernel address space, with no need to call something like get_user_pages() to establish a mapping, right? Is the intent of this to allow the process memory to be addressed, even though the process is not active? If so, then what you want to do is establish a kernel mapping for the pages, and mark them non-swappable. Otherwise, what you want is automatic (see uiomove). -- Terry To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message

