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-changelog

[Xen-changelog] [xen-unstable] libxc: Fix xc_translate_foreign_address i

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] libxc: Fix xc_translate_foreign_address in non-paged mode
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Tue, 07 Apr 2009 23:00:38 -0700
Delivery-date: Tue, 07 Apr 2009 23:02:17 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1238495576 -3600
# Node ID 192bc11d750653225f3f4a90e078503cdaf003c2
# Parent  ef56cfbdd390b54ddf2e8c50ac4984db753618cb
libxc: Fix xc_translate_foreign_address in non-paged mode

Returns paddr rather than gfn when in non-paged mode.  Add a shift to
fix it.

Signed-off-by: George Dunlap <george.dunlap@xxxxxxxxxxxxx>
---
 tools/libxc/xc_pagetab.c |    2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)

diff -r ef56cfbdd390 -r 192bc11d7506 tools/libxc/xc_pagetab.c
--- a/tools/libxc/xc_pagetab.c  Tue Mar 31 11:31:08 2009 +0100
+++ b/tools/libxc/xc_pagetab.c  Tue Mar 31 11:32:56 2009 +0100
@@ -32,7 +32,7 @@ unsigned long xc_translate_foreign_addre
                                              &ctx, sizeof ctx) != 0)
             return 0;
         if (!(ctx.cr0 & CR0_PG))
-            return virt;
+            return virt >> PAGE_SHIFT;
         pt_levels = (ctx.msr_efer&EFER_LMA) ? 4 : (ctx.cr4&CR4_PAE) ? 3 : 2;
         paddr = ctx.cr3 & ((pt_levels == 3) ? ~0x1full : ~0xfffull);
     } else {

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] libxc: Fix xc_translate_foreign_address in non-paged mode, Xen patchbot-unstable <=