From owner-freebsd-arch@FreeBSD.ORG Fri Sep 15 15:21:48 2006 Return-Path: X-Original-To: freebsd-arch@freebsd.org Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8B05A16A403; Fri, 15 Sep 2006 15:21:48 +0000 (UTC) (envelope-from delphij@delphij.net) Received: from tarsier.geekcn.org (tarsier.geekcn.org [210.51.165.229]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1234A43D4C; Fri, 15 Sep 2006 15:21:47 +0000 (GMT) (envelope-from delphij@delphij.net) Received: from localhost (tarsier.geekcn.org [210.51.165.229]) by tarsier.geekcn.org (Postfix) with ESMTP id 675ABEB3198; Fri, 15 Sep 2006 23:21:43 +0800 (CST) X-Virus-Scanned: amavisd-new at geekcn.org Received: from tarsier.geekcn.org ([210.51.165.229]) by localhost (mail.geekcn.org [210.51.165.229]) (amavisd-new, port 10024) with ESMTP id 09pp2GK66bDq; Fri, 15 Sep 2006 23:21:38 +0800 (CST) Received: from [192.168.1.32] (unknown [221.216.126.47]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by tarsier.geekcn.org (Postfix) with ESMTP id 57A68EB1BE1; Fri, 15 Sep 2006 23:21:38 +0800 (CST) DomainKey-Signature: a=rsa-sha1; s=default; d=delphij.net; c=nofws; q=dns; h=message-id:date:from:organization:user-agent:mime-version:to:cc: subject:references:in-reply-to:content-type:content-transfer-encoding; b=FEOv/iV8eBzB/wU/U/XWKJC6HCrPHSLTJXcYmc64B4K8ns6Dogv04WeHzC0dwhsmD tv/TvymDAJfYAiwz7UjEA== Message-ID: <450AC4FE.6070303@delphij.net> Date: Fri, 15 Sep 2006 23:21:34 +0800 From: LI Xin Organization: The FreeBSD Project User-Agent: Thunderbird 1.5.0.7 (Macintosh/20060909) MIME-Version: 1.0 To: John Baldwin References: <450AB80B.1050100@delphij.net> <200609151035.12069.jhb@freebsd.org> In-Reply-To: <200609151035.12069.jhb@freebsd.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-arch@freebsd.org Subject: Re: How to map a page with userland program? X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Sep 2006 15:21:48 -0000 John Baldwin wrote: > On Friday 15 September 2006 10:26, LI Xin wrote: >> Dear folks, >> >> Is there a continent and MI way to map a kernel page into userland >> address space under the same virtual address? It seems that this can be >> implemented through some routines in MD part of pmap, but is it possible >> to use higher level VM routines to do the job? > > Not to the same userland virtual address. Why do you need the same > virtual address anyway? If it's for pointers use offsets relative to > the start of the page instead. That would make it easier to implement some sort of VSYSCALL, which is in fact executed in userland. Or, is there any better way? :-) Cheers, -- Xin LI http://www.delphij.net/ FreeBSD - The Power to Serve!