diff options
author | Daniel Kiper <daniel.kiper@oracle.com> | 2013-07-16 14:32:03 +0200 |
---|---|---|
committer | Atsushi Kumagai <kumagai-atsushi@mxc.nes.nec.co.jp> | 2013-07-23 11:04:01 +0900 |
commit | 8c7c55e16139f7798ec27d94a0585c0968595a3f (patch) | |
tree | 4f114a66ec2ca4885f83b937fb8028425f9cf8f3 /arch | |
parent | 150b58eb299066c65ef7713a93effc35c00be03a (diff) |
[PATCH v3 1/7] xen: Improve calculation of beginning of virtual address space.
Xen commit 4b28bf6ae90bd83fd1113d8bdc53c3266ffeb328 (x86: re-introduce
map_domain_page() et al) once again altered virtual address space.
Current algorithm calculating its start could not cope with that change.
New version establishes this value on the base of domain_list placement
and is more generic.
Similar patch was applied to crash tool.
Signed-off-by: Daniel Kiper <daniel.kiper@oracle.com>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/x86_64.c | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/arch/x86_64.c b/arch/x86_64.c index 8e61b20..d864a06 100644 --- a/arch/x86_64.c +++ b/arch/x86_64.c @@ -372,14 +372,20 @@ int get_xen_basic_info_x86_64(void) info->xen_phys_start = info->xen_crash_info.v2->xen_phys_start; } + info->xen_virt_start = SYMBOL(domain_list); + + /* + * Xen virtual mapping is aligned to 1 GiB boundary. + * domain_list lives in bss which sits no more than + * 1 GiB below beginning of virtual address space. + */ + info->xen_virt_start &= 0xffffffffc0000000; + if (info->xen_crash_info.com && - info->xen_crash_info.com->xen_major_version >= 4) { - info->xen_virt_start = XEN_VIRT_START_V4; + info->xen_crash_info.com->xen_major_version >= 4) info->directmap_virt_end = DIRECTMAP_VIRT_END_V4; - } else { - info->xen_virt_start = XEN_VIRT_START_V3; + else info->directmap_virt_end = DIRECTMAP_VIRT_END_V3; - } if (SYMBOL(pgd_l4) == NOT_FOUND_SYMBOL) { ERRMSG("Can't get pml4.\n"); |