diff options
author | Petr Tesarik <ptesarik@suse.cz> | 2012-11-01 10:36:47 +0900 |
---|---|---|
committer | Atsushi Kumagai <kumagai-atsushi@mxc.nes.nec.co.jp> | 2012-11-16 11:06:50 +0900 |
commit | 91511722b70c4dc23bd2ada15dd479136952512f (patch) | |
tree | c20f7190dc08ffbf62f5aba24d6d1b908bfb350b /arch/x86_64.c | |
parent | fccad16632719a90f28d8ac252358918b39dc50b (diff) |
[PATCH v3 9/9] Do not fail for symbols removed in Xen4.
Xen-4.0+ removes some of the symbols that were necessary to process dump
files on Xen-3, and makedumpfile fails if they are not found.
Since most of these symbols are not needed for Xen4, we can simply remove
the checks. The only exception is "frame_table". This used to be a global
variable holding the address of the array of struct page_info. In Xen-4.0
the array is always located at a fixed address in virtual address space.
Xen adds a compatibility symbol for VMCOREINFO, but a "frame_table" symbol
does not exist as such, so we must use the fixed address instead.
Signed-off-by: Norbert Trapp <norbert.trapp@ts.fujitsu.com>
Signed-off-by: Petr Tesarik <ptesarik@suse.cz>
Diffstat (limited to 'arch/x86_64.c')
-rw-r--r-- | arch/x86_64.c | 49 |
1 files changed, 26 insertions, 23 deletions
diff --git a/arch/x86_64.c b/arch/x86_64.c index 0ce9674..8e61b20 100644 --- a/arch/x86_64.c +++ b/arch/x86_64.c @@ -363,9 +363,6 @@ kvtop_xen_x86_64(unsigned long kvaddr) int get_xen_basic_info_x86_64(void) { - unsigned long frame_table_vaddr; - unsigned long xen_end; - if (!info->xen_phys_start) { if (info->xen_crash_info_v < 2) { ERRMSG("Can't get Xen physical start address.\n" @@ -389,28 +386,34 @@ int get_xen_basic_info_x86_64(void) return FALSE; } - if (SYMBOL(frame_table) == NOT_FOUND_SYMBOL) { - ERRMSG("Can't get the symbol of frame_table.\n"); - return FALSE; - } - if (!readmem(VADDR_XEN, SYMBOL(frame_table), &frame_table_vaddr, - sizeof(frame_table_vaddr))) { - ERRMSG("Can't get the value of frame_table.\n"); - return FALSE; - } - info->frame_table_vaddr = frame_table_vaddr; + if (SYMBOL(frame_table) != NOT_FOUND_SYMBOL) { + unsigned long frame_table_vaddr; - if (SYMBOL(xenheap_phys_end) == NOT_FOUND_SYMBOL) { - ERRMSG("Can't get the symbol of xenheap_phys_end.\n"); - return FALSE; - } - if (!readmem(VADDR_XEN, SYMBOL(xenheap_phys_end), &xen_end, - sizeof(xen_end))) { - ERRMSG("Can't get the value of xenheap_phys_end.\n"); - return FALSE; + if (!readmem(VADDR_XEN, SYMBOL(frame_table), + &frame_table_vaddr, sizeof(frame_table_vaddr))) { + ERRMSG("Can't get the value of frame_table.\n"); + return FALSE; + } + info->frame_table_vaddr = frame_table_vaddr; + } else + info->frame_table_vaddr = FRAMETABLE_VIRT_START; + + if (!info->xen_crash_info.com || + info->xen_crash_info.com->xen_major_version < 4) { + unsigned long xen_end; + + if (SYMBOL(xenheap_phys_end) == NOT_FOUND_SYMBOL) { + ERRMSG("Can't get the symbol of xenheap_phys_end.\n"); + return FALSE; + } + if (!readmem(VADDR_XEN, SYMBOL(xenheap_phys_end), &xen_end, + sizeof(xen_end))) { + ERRMSG("Can't get the value of xenheap_phys_end.\n"); + return FALSE; + } + info->xen_heap_start = 0; + info->xen_heap_end = paddr_to_pfn(xen_end); } - info->xen_heap_start = 0; - info->xen_heap_end = paddr_to_pfn(xen_end); return TRUE; } |