<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<META NAME="Generator" CONTENT="MS Exchange Server version 5.5.2654.45">
<TITLE>RE: registering read-only memory</TITLE>
</HEAD>
<BODY>
<P><FONT SIZE=2>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. One thing I can think of is implementing something similar to follow_page(). Or better if the kernel will export follow_page().</FONT></P>
<P><FONT SIZE=2>-----Original Message-----</FONT>
<BR><FONT SIZE=2>From: Roland Dreier [<A HREF="mailto:roland@topspin.com">mailto:roland@topspin.com</A>]</FONT>
<BR><FONT SIZE=2>Sent: Thursday, May 26, 2005 10:09 PM</FONT>
<BR><FONT SIZE=2>To: Eli Cohen</FONT>
<BR><FONT SIZE=2>Cc: Michael S. Tsirkin; openib-general@openib.org</FONT>
<BR><FONT SIZE=2>Subject: Re: registering read-only memory</FONT>
</P>
<BR>
<P><FONT SIZE=2>OK, I think I understand the problem. The compiler puts a string</FONT>
<BR><FONT SIZE=2>defined with "const char *foo" on a read-only page, but in</FONT>
<BR><FONT SIZE=2>uverbs_mem.c we always pass write=1 to get_user_pages(). I need to</FONT>
<BR><FONT SIZE=2>fix the code so that it only asks for writeable pages if we're</FONT>
<BR><FONT SIZE=2>registering with writable permissions.</FONT>
</P>
<P><FONT SIZE=2> - R.</FONT>
</P>
</BODY>
</HTML>