[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH] fix xenctx with 32-on-64 domains
# HG changeset patch # User Paolo Bonzini <pbonzini@xxxxxxxxxx> # Date 1299171180 -3600 # Node ID c639f0afaa74591d1053677b0a6348503a14fd78 # Parent c923816861a96328aaf3d5ba8939fd9b4c441cd0 fix xenctx with 32-on-64 domains When compiled on 64-bit, xenctx was using the 64-bit version of xen_cr3_to_pfn even for 32-bit PV domains. This is wrong, and this patch fixes it. Signed-off-by: Paolo Bonzini <pbonzini@xxxxxxxxxx> diff --git a/tools/libxc/xc_pagetab.c b/tools/libxc/xc_pagetab.c --- a/tools/libxc/xc_pagetab.c +++ b/tools/libxc/xc_pagetab.c @@ -64,8 +64,8 @@ unsigned long xc_translate_foreign_addre paddr = ctx.x64.ctrlreg[3] & ~0xfffull; } else { pt_levels = 3; - paddr = (((uint64_t) xen_cr3_to_pfn(ctx.x32.ctrlreg[3])) - << PAGE_SHIFT); + paddr = (((unsigned)ctx.x32.ctrlreg[3] >> 12) | + ((unsigned)ctx.x32.ctrlreg[3] << 20)) << PAGE_SHIFT; } } _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |