summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMagnus Damm <magnus@valinux.co.jp>2006-11-22 13:32:28 +0900
committerSimon Horman <horms@verge.net.au>2006-11-27 12:25:13 +0900
commitc41620b1d2717a6eb1969ad03758a1b707ba55ab (patch)
tree6f38f1d23b59807ece010183d9774b392db986b9
parent85d91aabcd06e9376d5bfb05ac0e80cba049daa2 (diff)
kexec-tools: Xen on x86_64 fix
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 <magnus@valinux.co.jp> Signed-off-by: Simon Horman <horms@verge.net.au>
-rw-r--r--kexec/arch/x86_64/crashdump-x86_64.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/kexec/arch/x86_64/crashdump-x86_64.c b/kexec/arch/x86_64/crashdump-x86_64.c
index b1a1339..14b70ea 100644
--- a/kexec/arch/x86_64/crashdump-x86_64.c
+++ b/kexec/arch/x86_64/crashdump-x86_64.c
@@ -58,6 +58,9 @@ static int get_kernel_paddr(struct kexec_info *info)
{
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(struct kexec_info *info)
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);