[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-unstable] libxc: Fix xc_translate_foreign_address in non-paged mode



# 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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.