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] xc_translate_foreign_address

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] xc_translate_foreign_address
From: Chris Morrow <cmorrow@xxxxxxxxxxxxxx>
Date: Tue, 24 Apr 2007 18:51:29 -0600
Delivery-date: Tue, 24 Apr 2007 17:50:10 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
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>
Organization: YottaYotta Inc.
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5) Gecko/20031016

Xc_translate_foreign_address has issues when try to translate addresses from the a non PAE domain. Lines 135 & 159 do a retrieve a 64 bit quantity using a *(unsigned long long *) cast, when what is required is an unsigned long.



diff -r 489f28021f26 tools/libxc/xc_pagetab.c
--- a/tools/libxc/xc_pagetab.c  Wed Dec 20 09:47:24 2006 +0000
+++ b/tools/libxc/xc_pagetab.c  Fri Apr 20 18:38:22 2007 -0600
@@ -132,7 +132,7 @@ unsigned long xc_translate_foreign_addre
     if (pt_levels >= 3)
pde = *(unsigned long long *)(pd + 8 * ((virt >> L2_PAGETABLE_SHIFT_PAE) & L2_PAGETABLE_MASK_PAE));
     else
- pde = *(unsigned long long *)(pd + 4 * ((virt >> L2_PAGETABLE_SHIFT) & L2_PAGETABLE_MASK)); + pde = *(unsigned long *)(pd + 4 * ((virt >> L2_PAGETABLE_SHIFT) & L2_PAGETABLE_MASK));

     if ((pde & 1) == 0) {
         DPRINTF("page entry not present in PD\n");
@@ -156,7 +156,7 @@ unsigned long xc_translate_foreign_addre
         if (pt_levels >= 3)
pte = *(unsigned long long *)(pt + 8 * ((virt >> L1_PAGETABLE_SHIFT_PAE) & L1_PAGETABLE_MASK_PAE));
         else
- pte = *(unsigned long long *)(pt + 4 * ((virt >> L1_PAGETABLE_SHIFT) & L1_PAGETABLE_MASK)); + pte = *(unsigned long *)(pt + 4 * ((virt >> L1_PAGETABLE_SHIFT) & L1_PAGETABLE_MASK));

         if ((pte & 0x00000001) == 0) {
             DPRINTF("page entry not present in PT\n");

--
Chris Morrow    YottaYotta Inc. email: cmorrow@xxxxxxxxxxxxxx
phone: (780) 989 6814           web:   http://www.yottayotta.com



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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] xc_translate_foreign_address, Chris Morrow <=