From: Andi Kleen Subject: Re: [RFC PATCH 32/35] Add Xen driver utility functions. Date: Wed, 22 Mar 2006 15:12:12 +0100 Message-ID: <200603221512.13287.ak@suse.de> References: <20060322063040.960068000@sorel.sous-sol.org> <20060322063806.845778000@sorel.sous-sol.org> Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20060322063806.845778000@sorel.sous-sol.org> Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: virtualization@lists.osdl.org Cc: Chris Wright , Ian Pratt , xen-devel@lists.xensource.com, linux-kernel@vger.kernel.org, jbeulich@novell.com List-Id: xen-devel@lists.xenproject.org On Wednesday 22 March 2006 07:31, Chris Wright wrote: > + /* > + * Ensure that the page tables are mapped into the current mm. The > + * page-fault path will copy the page directory pointers from init_mm. > + */ > + for (i = 0; i < area->size; i += PAGE_SIZE) > + (void)__get_user(c, (char __user *)area->addr + i); It would be easier and simpler to just copy the pgd manually. Iirc Jan B. had a patch for a vmalloc_sync() function for this purpose, maybe that one could be used. -Andi