From mboxrd@z Thu Jan 1 00:00:00 1970 From: Koripella Srinivas Subject: Re: Grant Tables & mm.c Date: Sat, 7 Jul 2007 19:14:43 +0530 (IST) Message-ID: <913023.61596.qm@web94111.mail.in2.yahoo.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0697443445==" Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Mime-version: 1.0 Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Mark Williamson Cc: derek.murray@cl.cam.ac.uk, xen-devel@lists.xensource.com, keir@xensource.com List-Id: xen-devel@lists.xenproject.org --===============0697443445== Content-Type: multipart/alternative; boundary="0-215412361-1183815883=:61596" --0-215412361-1183815883=:61596 Content-Type: text/plain; charset=ascii I was looking at the user space grant tables but i did not find any code calling the function "remap_pfn_range" to map the kmalloc ed allocated memory into user space. What could be the reason?? Or am i missing something Thanks Mark. ----- Original Message ---- From: Mark Williamson To: Koripella Srinivas Cc: xen-devel@lists.xensource.com Sent: Friday, 6 July, 2007 9:55:48 AM Subject: Re: [Xen-devel] Grant Tables & mm.c > " Linux tends to zap userspace page mappings quite cheerfully > unless you do something to stop it, could this be your problem?" > > What does this mean exactly?? Linux "zaps" mappings when it removes them from pagetables. Really this corresponds to zeroing a pte corresponding to that mapping. Unless you do something to stop the Linux mm system from treating the grant table mappins like "normal" RAM, it will eventually want to simply zero them. This will break for grant mappings, since it is not a permitted means of unmapping granted memory. > Any way i can prevent it from happening? It depends on what you're trying to do... Have you looked at the userspace grantables driver in our Linux tree? This provides a device for mapping granted memory safely into userspace, handling cleanup correctly. Even if that's not directly useful, maybe you can find some code in there that'll help you. Cheers, Mark -- Dave: Just a question. What use is a unicyle with no seat? And no pedals! Mark: To answer a question with a question: What use is a skateboard? Dave: Skateboards have wheels. Mark: My wheel has a wheel! __________________________________________________________ Yahoo! India Answers: Share what you know. Learn something new http://in.answers.yahoo.com/ --0-215412361-1183815883=:61596 Content-Type: text/html; charset=iso-8859-7 Content-Transfer-Encoding: quoted-printable
I was looking at the user space grant tables but i did= not find any code calling the function
"remap_pfn_range" to map the kma= lloc ed allocated memory into user space.
What could be the reason?? Or = am i missing something

Thanks Mark.
<=
br>

----- Original Message ----
From: Mark Williamson &= lt;mark.williamson@cl.cam.ac.uk>
To: Koripella Srinivas <talkwiths= rinivas@yahoo.co.in>
Cc: xen-devel@lists.xensource.com
Sent: Frida= y, 6 July, 2007 9:55:48 AM
Subject: Re: [Xen-devel] Grant Tables & = mm.c

> " Linux tends to zap userspace page mappings quite ch= eerfully
> unless you do something to stop it, could this be your problem?"
>
> = What does this mean exactly??

Linux "zaps" mappings when it removes = them from pagetables.  Really this
corresponds to zeroing a p= te corresponding to that mapping.

Unless you do something to stop th= e Linux mm system from treating the grant
table mappins like "normal" R= AM, it will eventually want to simply zero them.  
This will b= reak for grant mappings, since it is not a permitted means of
unmapping= granted memory.

> Any way i can prevent it from happening?
It depends on what you're trying to do...

Have you looked at the u= serspace grantables driver in our Linux tree?  This
provides = a device for mapping granted memory safely into userspace, handling
cle= anup correctly.  Even if that's not directly useful, maybe you ca= n find
some code in there that'll help you.

Cheers,
Mark
<= br>--
Dave: Just a question. What use is a unicyle with no seat?  = And no pedals!
Mark: To answer a question with a question: What use is a= skateboard?
Dave: Skateboards have wheels.
Mark: My wheel has a whee= l!


=0A=0A=0A=09=0A=09=09
=0AHere=A2s a new way to find what you're looking for - Yahoo! An= swers --0-215412361-1183815883=:61596-- --===============0697443445== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --===============0697443445==--