kexec-tools: Xen on x86_64 fix

This patch makes it possible to use the kexec binary under Xen/dom0 on the 
x86_64 architecture. Without this fix it is impossible to load a crash kernel,
kexec will fail with a "Cannot determine kernel physical load addr" message.

Signed-off-by: Magnus Damm <[EMAIL PROTECTED]>
---

 Apply on top of the Xen patches sent out yesterday to the fastboot list.

 kexec/arch/x86_64/crashdump-x86_64.c |    6 ++++++
 1 file changed, 6 insertions(+)

--- 0012/kexec/arch/x86_64/crashdump-x86_64.c
+++ work/kexec/arch/x86_64/crashdump-x86_64.c   2006-11-22 13:07:01.000000000 
+0900
@@ -58,6 +58,9 @@ static int get_kernel_paddr(struct kexec
 {
        uint64_t start;
 
+       if (xen_present()) /* Kernel not entity mapped under Xen */
+               return 0;
+
        if (parse_iomem_single("Kernel code\n", &start, NULL) == 0) {
                info->kern_paddr_start = start;
 #ifdef DEBUG
@@ -88,6 +91,9 @@ static int get_kernel_vaddr_and_size(str
        unsigned long size;
        uint32_t elf_flags = 0;
 
+       if (xen_present()) /* Kernel not entity mapped under Xen */
+               return 0;
+
        align = getpagesize();
        size = KCORE_ELF_HEADERS_SIZE;
        buf = slurp_file_len(kcore, size);
_______________________________________________
fastboot mailing list
fastboot@lists.osdl.org
https://lists.osdl.org/mailman/listinfo/fastboot

Reply via email to