[openib-general] RE: registering read-only memory
Grant Grundler
iod00d at hp.com
Thu May 26 18:11:38 PDT 2005
On Thu, May 26, 2005 at 10:23:55PM +0300, Eli Cohen wrote:
> I'm afraid that won't solve the problem. From some reason the vma of such a
> region is flagged with VM_IO and that's why get_user_pages() will fail. We
> need to find another way to get the physical address of such memory.
Sorry - why do you need the physical address of memory?
Did you mean you need the DMA address?
grant
> One
> thing I can think of is implementing something similar to follow_page(). Or
> better if the kernel will export follow_page().
>
> -----Original Message-----
> From: Roland Dreier [mailto:roland at topspin.com]
> Sent: Thursday, May 26, 2005 10:09 PM
> To: Eli Cohen
> Cc: Michael S. Tsirkin; openib-general at openib.org
> Subject: Re: registering read-only memory
>
>
> OK, I think I understand the problem. The compiler puts a string
> defined with "const char *foo" on a read-only page, but in
> uverbs_mem.c we always pass write=1 to get_user_pages(). I need to
> fix the code so that it only asks for writeable pages if we're
> registering with writable permissions.
>
> - R.
> _______________________________________________
> openib-general mailing list
> openib-general at openib.org
> http://openib.org/mailman/listinfo/openib-general
>
> To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general
More information about the general
mailing list