ia64/xen-unstable

changeset 19452:192bc11d7506

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@eu.citrix.com>
author Keir Fraser <keir.fraser@citrix.com>
date Tue Mar 31 11:32:56 2009 +0100 (2009-03-31)
parents ef56cfbdd390
children b7a11dff84c0
files tools/libxc/xc_pagetab.c
line diff
     1.1 --- a/tools/libxc/xc_pagetab.c	Tue Mar 31 11:31:08 2009 +0100
     1.2 +++ b/tools/libxc/xc_pagetab.c	Tue Mar 31 11:32:56 2009 +0100
     1.3 @@ -32,7 +32,7 @@ unsigned long xc_translate_foreign_addre
     1.4                                               &ctx, sizeof ctx) != 0)
     1.5              return 0;
     1.6          if (!(ctx.cr0 & CR0_PG))
     1.7 -            return virt;
     1.8 +            return virt >> PAGE_SHIFT;
     1.9          pt_levels = (ctx.msr_efer&EFER_LMA) ? 4 : (ctx.cr4&CR4_PAE) ? 3 : 2;
    1.10          paddr = ctx.cr3 & ((pt_levels == 3) ? ~0x1full : ~0xfffull);
    1.11      } else {