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

[Xen-devel] Dom heap virtual address question

To: "Xen-Devel (E-mail)" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] Dom heap virtual address question
From: Daniel Magenheimer <dan.magenheimer@xxxxxxxxxx>
Date: Tue, 26 Aug 2008 16:48:55 -0700 (PDT)
Delivery-date: Tue, 26 Aug 2008 16:49:35 -0700
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
Silly x86-related memory question from someone who has only
used global virtual address machines for too many years:

Is it possible to take the result of an alloc_domheap_pages()
(struct page_info *) and convert this to a virtual address
that can be used at a later time in the hypervisor (not
in a domain)?  E.g.

va = mfn_to_virt(page_to_mfn(alloc_domheap_pages()))
  :
(many seconds later, still in hypervisor)
  :
a = *(unsigned int *)va;

Or is it necessary to do a va = map_domain_page(mfn)
then unmap_domain_page(va) around each usage?  (And
if so do I need the _global version of these?)

I'm willing to restrict this to 64-bit hypervisor only
if that matters...  but ideally I'd like it to be
portable (i.e. to ia64/ppc).

Also, if it matters, I'd probably use anonymous domain
(NULL) rather than current->domain.

Thanks,
Dan

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

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