[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen-unstable] x86, libxc: Fix xc_translate_foreign_address() for PV guests of
# HG changeset patch # User Keir Fraser <keir@xxxxxxx> # Date 1299174404 0 # Node ID de49500f344adb3b8fa240ec1d43bedc7f216ce5 # Parent 9dfd7ffcd76c70191dcca9be0820483baa6cafa3 x86, libxc: Fix xc_translate_foreign_address() for PV guests of different bitness than dom0 (32-bit vs 64-bit). Original patch by: Paolo Bonzini <pbonzini@xxxxxxxxxx> Signed-off-by: Keir Fraser <keir@xxxxxxx> --- diff -r 9dfd7ffcd76c -r de49500f344a tools/include/xen-foreign/structs.py --- a/tools/include/xen-foreign/structs.py Thu Mar 03 15:14:30 2011 +0000 +++ b/tools/include/xen-foreign/structs.py Thu Mar 03 17:46:44 2011 +0000 @@ -53,6 +53,7 @@ # all archs "xen_pfn_to_cr3", + "xen_cr3_to_pfn", "XEN_LEGACY_MAX_VCPUS", "MAX_GUEST_CMDLINE" ]; diff -r 9dfd7ffcd76c -r de49500f344a tools/libxc/xc_pagetab.c --- a/tools/libxc/xc_pagetab.c Thu Mar 03 15:14:30 2011 +0000 +++ b/tools/libxc/xc_pagetab.c Thu Mar 03 17:46:44 2011 +0000 @@ -61,11 +61,12 @@ return 0; if (domctl.u.address_size.size == 64) { pt_levels = 4; - paddr = ctx.x64.ctrlreg[3] & ~0xfffull; + paddr = (uint64_t)xen_cr3_to_pfn_x86_64(ctx.x64.ctrlreg[3]) + << PAGE_SHIFT; } else { pt_levels = 3; - paddr = (((uint64_t) xen_cr3_to_pfn(ctx.x32.ctrlreg[3])) - << PAGE_SHIFT); + paddr = (uint64_t)xen_cr3_to_pfn_x86_32(ctx.x32.ctrlreg[3]) + << PAGE_SHIFT; } } _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |