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] Dom heap virtual address question

To: "Tian, Kevin" <kevin.tian@xxxxxxxxx>, "Xen-Devel (E-mail)" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: RE: [Xen-devel] Dom heap virtual address question
From: Daniel Magenheimer <dan.magenheimer@xxxxxxxxxx>
Date: Tue, 26 Aug 2008 19:24:31 -0700 (PDT)
Cc:
Delivery-date: Tue, 26 Aug 2008 19:25:11 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <D470B4E54465E3469E2ABBC5AFAC390F024D96E9@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>
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
> But for portability, it's better to have 32bit implication
> in mind to avoid mistake. :-)

Yes, exactly what I was thinking!

> For 64bit xen, both local and global version are simply
> macros to mfn_to_virt which is a directly mapping

OK, I found this in xen/include/xen/domain_page.h
but was confused because CONFIG_DOMAIN_PAGE must
be set to zero and include/asm-x86/config.h sets
it to one.  But apparently the 64-bit build scripts
override the config.h setting and CONFIG_DOMAIN_PAGE=1
is used.

Thanks again!
Dan

> -----Original Message-----
> From: Tian, Kevin [mailto:kevin.tian@xxxxxxxxx]
> Sent: Tuesday, August 26, 2008 7:29 PM
> To: Daniel Magenheimer; Xen-Devel (E-mail)
> Subject: RE: [Xen-devel] Dom heap virtual address question
>
>
> >From: Daniel Magenheimer [mailto:dan.magenheimer@xxxxxxxxxx]
> >Sent: 2008年8月27日 9:20
> >
> >Hi Kevin --
> >
> >Thanks much for the reply.
> >
> >Further clarification on the _global versions:
> >If domainA makes a hypercall that results in the
> >
> >va = mfn_to_virt(page_to_mfn(alloc_domheap_pages()))
> >
> >(or equivalent wrapped in map/unmap_domain_page)
> >
> >and then domainB makes a hypercall but IN THE
> >HYPERVISOR I want to make use of the previously
> >saved va (or mapped mfn), is that still in the context
> >of domainA?  In other words, I must use _global?
> >
>
> Yes. The ptes used for non global version is domain
> specific, which is changed along with context switch.
> However ptes for _global version are persistent across
> domains. This is for 32bit xen.
>
> For 64bit xen, both local and global version are simply
> macros to mfn_to_virt which is a directly mapping
> style setuped at boot time. In such case, you can always
> access previously mapped va from any domain context,
> regardless of which interface is used.
>
> But for portability, it's better to have 32bit implication
> in mind to avoid mistake. :-)
>
> Thanks,
> Kevin
>

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

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