diff options
author | Ian Campbell <ian.campbell@xensource.com> | 2006-11-30 12:38:51 +0000 |
---|---|---|
committer | Ian Campbell <ian.campbell@xensource.com> | 2006-11-30 12:38:51 +0000 |
commit | 92491dae02f30ee1d0b65c8ca425adf8dc1b0daf (patch) | |
tree | ccfb881332bc159726e8125c702d256223160e45 /linux-2.6-xen-sparse | |
parent | 6dd60f6880df6d369385bdac2e41a5b6211423d9 (diff) | |
download | xen-92491dae02f30ee1d0b65c8ca425adf8dc1b0daf.tar.gz xen-92491dae02f30ee1d0b65c8ca425adf8dc1b0daf.tar.bz2 xen-92491dae02f30ee1d0b65c8ca425adf8dc1b0daf.zip |
[XEN] Kexec / Kdump: x86_32 specific code
This patch contains the x86_32 implementation of Kexec / Kdump for Xen.
Signed-Off-By: Magnus Damm <magnus@valinux.co.jp>
Signed-Off-By: Simon Horman <horms@verge.net.au>
Diffstat (limited to 'linux-2.6-xen-sparse')
-rw-r--r-- | linux-2.6-xen-sparse/arch/i386/Kconfig | 2 | ||||
-rw-r--r-- | linux-2.6-xen-sparse/arch/i386/kernel/setup-xen.c | 19 | ||||
-rw-r--r-- | linux-2.6-xen-sparse/include/asm-i386/mach-xen/asm/hypercall.h | 8 |
3 files changed, 27 insertions, 2 deletions
diff --git a/linux-2.6-xen-sparse/arch/i386/Kconfig b/linux-2.6-xen-sparse/arch/i386/Kconfig index b3ef1013c4..8c712269d0 100644 --- a/linux-2.6-xen-sparse/arch/i386/Kconfig +++ b/linux-2.6-xen-sparse/arch/i386/Kconfig @@ -726,7 +726,7 @@ source kernel/Kconfig.hz config KEXEC bool "kexec system call (EXPERIMENTAL)" - depends on EXPERIMENTAL && !X86_XEN + depends on EXPERIMENTAL && !XEN_UNPRIVILEGED_GUEST help kexec is a system call that implements the ability to shutdown your current kernel, and to start another kernel. It is like a reboot diff --git a/linux-2.6-xen-sparse/arch/i386/kernel/setup-xen.c b/linux-2.6-xen-sparse/arch/i386/kernel/setup-xen.c index 2586296dbb..252e5c4ec2 100644 --- a/linux-2.6-xen-sparse/arch/i386/kernel/setup-xen.c +++ b/linux-2.6-xen-sparse/arch/i386/kernel/setup-xen.c @@ -69,6 +69,10 @@ #include "setup_arch_pre.h" #include <bios_ebda.h> +#ifdef CONFIG_XEN +#include <xen/interface/kexec.h> +#endif + /* Forward Declaration. */ void __init find_max_pfn(void); @@ -943,6 +947,7 @@ static void __init parse_cmdline_early (char ** cmdline_p) * after a kernel panic. */ else if (!memcmp(from, "crashkernel=", 12)) { +#ifndef CONFIG_XEN unsigned long size, base; size = memparse(from+12, &from); if (*from == '@') { @@ -953,6 +958,10 @@ static void __init parse_cmdline_early (char ** cmdline_p) crashk_res.start = base; crashk_res.end = base + size - 1; } +#else + printk("Ignoring crashkernel command line, " + "parameter will be supplied by xen\n"); +#endif } #endif #ifdef CONFIG_PROC_VMCORE @@ -1322,10 +1331,14 @@ void __init setup_bootmem_allocator(void) } #endif #ifdef CONFIG_KEXEC +#ifdef CONFIG_XEN + xen_machine_kexec_setup_resources(); +#else if (crashk_res.start != crashk_res.end) reserve_bootmem(crashk_res.start, crashk_res.end - crashk_res.start + 1); #endif +#endif if (!xen_feature(XENFEAT_auto_translated_physmap)) phys_to_machine_mapping = @@ -1389,7 +1402,11 @@ legacy_init_iomem_resources(struct e820entry *e820, int nr_map, request_resource(res, data_resource); #endif #ifdef CONFIG_KEXEC - request_resource(res, &crashk_res); + if (crashk_res.start != crashk_res.end) + request_resource(res, &crashk_res); +#ifdef CONFIG_XEN + xen_machine_kexec_register_resources(res); +#endif #endif } } diff --git a/linux-2.6-xen-sparse/include/asm-i386/mach-xen/asm/hypercall.h b/linux-2.6-xen-sparse/include/asm-i386/mach-xen/asm/hypercall.h index a12e349016..c3ed3584b6 100644 --- a/linux-2.6-xen-sparse/include/asm-i386/mach-xen/asm/hypercall.h +++ b/linux-2.6-xen-sparse/include/asm-i386/mach-xen/asm/hypercall.h @@ -395,5 +395,13 @@ HYPERVISOR_xenoprof_op( return _hypercall2(int, xenoprof_op, op, arg); } +static inline int +HYPERVISOR_kexec_op( + unsigned long op, void *args) +{ + return _hypercall2(int, kexec_op, op, args); +} + + #endif /* __HYPERCALL_H__ */ |