WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] [PATCH][TOOLS] libxc: mmap fixes for BSD

To: Christoph Egger <Christoph.Egger@xxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: Re: [Xen-devel] [PATCH][TOOLS] libxc: mmap fixes for BSD
From: Keir Fraser <keir.fraser@xxxxxxxxxxxxx>
Date: Tue, 10 Jun 2008 15:21:56 +0100
Delivery-date: Tue, 10 Jun 2008 07:22:39 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <200806101609.21552.Christoph.Egger@xxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AcjLBVYblJkBmjb4Ed2k+wAX8io7RQ==
Thread-topic: [Xen-devel] [PATCH][TOOLS] libxc: mmap fixes for BSD
User-agent: Microsoft-Entourage/11.4.0.080122


On 10/6/08 15:09, "Christoph Egger" <Christoph.Egger@xxxxxxx> wrote:

> On BSD, mmap()ing files works on on-disk files but not on
> pseudo filesystems like kernfs or procfs.
> Therefore, attached patch mmap()s anonymous memory.
> 
> Linux equivalents are sysfs and procfs to above BSD's pseudo-filesystems.
> On Linux, mmap is implemented for sysfs but it is questionable to me
> how write operations work since (most) files in sysfs have
> static content. So this patch may fix some problems
> with a Linux Dom0, too.

We can hide special setup in mmap(/proc/xen/privcmd) that is necessary for
later foreign mapping operations. Perhaps xc_map_foreign_ranges() interface
could be changed so that it does the mmap(), then fills in the .va field in
the array of entries that it is passed, and finally return the address it
got from mmap()?

This would make xc_map_foreign_ranges() similar to our other xc_map*()
functions, which all hide the mmap() invocation inside their implementation.

 -- Keir



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>