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] Mmap to user space (question)

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: Re: [Xen-devel] Mmap to user space (question)
From: Ruslan Nikolaev <nruslan_devel@xxxxxxxxx>
Date: Wed, 6 Oct 2010 10:54:31 -0700 (PDT)
Delivery-date: Wed, 06 Oct 2010 10:55:34 -0700
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1286387672; bh=jUlQqTnTIta/bgOPxUmT5z6KMF6vP60AygRJq4QmeaA=; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=Uo1AG1/WLD8fh0r17uVwvl/MqtUrOE6ExA9bSQ6nvKwNWtdAaR2jvFcGhl8h5z04VOPrOT6T7N7MuTd18UlFasrfX/bF3/ovlyvMzzcSRJEIVxzolOkyZCuspmsFQ4MVQBl6fB7M4gafIeVGT9rR9l0FFV1r9184vlpJ3THUPVk=
Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=mDCOnVTXPKvD539X5XgMCNHYAqUAU6nSodcuFBH1B4kf6zIcKaMqDIw9mpkawzPzHP0aVioTMwSjLw1VAjKOhxd6XlFEUgTvob2uIPFjwr2L3wNWl2+8uPhA//JHmQ3rYd8rrVe8ECnbh+6lbSPZ15StAiR73hBipAy7rTnHn1Q=;
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
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/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx

--- On Wed, 10/6/10, Ruslan Nikolaev <nruslan_devel@xxxxxxxxx> wrote:

> From: Ruslan Nikolaev <nruslan_devel@xxxxxxxxx>
> Subject: Re: [Xen-devel] Mmap to user space (question)
> To: "Keir Fraser" <keir@xxxxxxx>
> Date: Wednesday, October 6, 2010, 9:53 PM
> 
> 
> --- On Wed, 10/6/10, Keir Fraser <keir@xxxxxxx>
> wrote:
> 
> > From: Keir Fraser <keir@xxxxxxx>
> > Subject: Re: [Xen-devel] Mmap to user space
> (question)
> > To: "Ruslan Nikolaev" <nruslan_devel@xxxxxxxxx>,
> xen-devel@xxxxxxxxxxxxxxxxxxx
> > Date: Wednesday, October 6, 2010, 10:52 AM
> > On 06/10/2010 00:10, "Ruslan
> > Nikolaev" <nruslan_devel@xxxxxxxxx>
> > wrote:
> > 
> > > Note: I already posted the message on xci-devel,
> but I
> > think this list is
> > > better suited for this question. So, I duplicated
> it
> > here.
> > > 
> > > ----
> > > 
> > > Hi
> > > 
> > > I need to map shared_info (provided by hypervisor
> to
> > each guest) to user space
> > > (read-only access). I am curious how I can do it,
> and
> > if there are some good
> > > examples for the case if NO autotranslation is
> > available. (BTW, Am I correct
> > > that I can use regular vm_insert_page or
> > remap_pfn_range if autotranslation is
> > > available?)
> > 
> > I wouldn't worry about auto-translate for PV guests.
> It's
> > pretty broken.
> > 
> > You will be using a similar mapping path to ioremap.
> So
> > something like
> > remap_pfn_range. A function called
> > xen_remap_domain_mfn_range sounds
> > promising. There's no grant table or other nonsense
> to
> > worry about. You just
> > need to get the page mapped into a special vmarea
> that
> > won't be subject to
> > paging or any other kernel VM machinery. Like mmap on
> > /dev/mem and
> > /proc/xen/privcmd, then.
> > 
> >  -- Keir
> 
> 
> 
> Thank you! I think, xen_remap_domain_mfn_range is indeed
> what I am looking for.
> 
> 
> Ruslan.
> 
> 
> > 
> > > If I am correct, shared_info page is mapped
> initially
> > into some fixmap area in
> > > the guest. However, no actual pfn exists for the
> page.
> > Instead, guest gets mfn
> > > address from start_info.
> > > 
> > > Now, what is the standard procedure to handle
> this
> > situation? I found
> > > xen_remap_domain_mfn_range function, but not sure
> if
> > it is what I am looking
> > > for. Also, I am not sure if I need to update
> grant
> > tables. I would greatly
> > > appreciate if someone can enlighten me on this
> issue,
> > and, perhaps, refer to
> > > some examples.
> > > 
> > > Thank you!
> > > 
> > > Ruslan.
> > > 
> > > 
> > > 
> > >       
> > > 
> > > _______________________________________________
> > > Xen-devel mailing list
> > > Xen-devel@xxxxxxxxxxxxxxxxxxx
> > > http://lists.xensource.com/xen-devel
> > 
> > 
> > 
> > _______________________________________________
> > Xen-devel mailing list
> > Xen-devel@xxxxxxxxxxxxxxxxxxx
> > http://lists.xensource.com/xen-devel
> > 
> 
> 
> 
> 




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

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