Kexec / Kdump: Release 20061023 (xen-unstable-11856)
cover Kexec / Kdump: Release 20061023 (xen-unstable-11856)
[PATCH 00/04] Kexec / Kdump: Release 20061023 (xen-unstable-11856)
This is the 20061023 release of the Kexec / Kdump patches for x86 Xen.
Test Results:
Kexec Kexec Kexec Kexec Kdump
Hardware Xen -> Xen -> bzImage -> Xen -> Xen ->
Arch Platform Xen bzImage Xen vmlinux vmlinux
i386 A PASS PASS PASS PASS PASS i386 B (VMX) PASS PASS PASS PASS PASS i386 C (SVM) PASS PASS PASS PASS PASS
i386/PAE A PASS PASS PASS PASS PASS i386/PAE B (VMX) PASS PASS PASS PASS PASS i386/PAE C (SVM) PASS PASS PASS PASS PASS
x86_64 D PASS PASS PASS PASS PASS x86_64 B (VMX) PASS PASS PASS PASS PASS x86_64 C (SVM) PASS PASS PASS PASS PASS
The tests were made with version 46ecc6c6c77b1fab20b08286209631a00eb1049e of kexec-tools from the kexec-tools-testing tree which can be found here:
http://www.kernel.org/git/?p=linux/kernel/git/horms/kexec-tools-testing.git
Hardware Platforms:
A: i386 - VA Linux 1220, 2 x Pentium III 866 Mhz, 2 GB
B: Intel VT - Shuttle XPC SD36G5, 1 x Pentium D 930, 1 GB
C: AMD VT - Shuttle XPC SK22G2, 1 x Athlon64 x2 3800+, 1 GB
D: x86_64 - TYAN Transport GX28 B2881, 2 x Opteron 244 1.8 GHz, 2 GB
Changes:
20061023 - Release 20061023 for xen-unstable-11856
- Removed disable_IO_APIC() call on guest side.
- Rewrote hypervisor code to support atomic image update.
- Merged load and unload code into one function.
- Replaced locking with spinlocks to avoid xchg() problems.
- Moved image type into per hypercall-op structure.
- Clean ups and minor fixes.
- Updated attribution.
- Header file and comment fixes.
- Reduced the total number of files and hunks.
20061016 - Release 20061016 for xen-unstable-11760
- "Avoid overwriting the current pgd (V4)" patches accepted upstream
- Included in Linux-2.6.19-rc1
- Up-ported Xen code to build on top of merged patches
- Implemented and tested VT-extension support for x86:
- Intel VMX / IVT "Vanderpool" support for x86_32 and x86_64
- AMD SVM / AMD-V "Pacifica" support for x86_32 and x86_64
- Command line parameter is now the same as for Linux:
- For instance, "crashkernel=64M@32M" reserves a 64 MB window at 32 MB
- x86 and ia64 patches are now separated, this release is x86-only
- The x86 port is from this release handled by Magnus Damm
- The ia64 port is handled by Simon Horman
20060931 - Take XIV for xen-unstable-11296 posted by Simon Horman
Enjoy!
/ magnus
PATCH 1/4 Kexec / Kdump: Generic code
[PATCH 01/04] Kexec / Kdump: Generic code
This patch implements the generic portion of the Kexec / Kdump port to Xen.
---
Applies on top of xen-unstable-11856.
linux-2.6-xen-sparse/drivers/xen/core/Makefile | 1 linux-2.6-xen-sparse/drivers/xen/core/crash.c | 44 ++ linux-2.6-xen-sparse/drivers/xen/core/machine_kexec.c | 80 ++++ linux-2.6-xen-sparse/drivers/xen/core/reboot.c | 4 patches/linux-2.6.16.29/kexec-generic.patch | 281 ++++++++++++++++ patches/linux-2.6.16.29/series | 1 xen/arch/ia64/xen/Makefile | 2 xen/arch/ia64/xen/crash.c | 19 + xen/arch/ia64/xen/machine_kexec.c | 34 ++ xen/arch/powerpc/Makefile | 2 xen/arch/powerpc/crash.c | 19 + xen/arch/powerpc/machine_kexec.c | 34 ++ xen/arch/x86/Makefile | 2 xen/arch/x86/crash.c | 19 + xen/arch/x86/machine_kexec.c | 34 ++ xen/common/Makefile | 1 xen/common/kexec.c | 288 +++++++++++++++++ xen/common/page_alloc.c | 33 + xen/drivers/char/console.c | 3 xen/include/asm-ia64/elf.h | 23 + xen/include/asm-ia64/kexec.h | 31 + xen/include/asm-powerpc/elf.h | 23 + xen/include/asm-powerpc/kexec.h | 31 + xen/include/asm-x86/elf.h | 23 + xen/include/asm-x86/kexec.h | 30 + xen/include/public/kexec.h | 88 +++++ xen/include/xen/elfcore.h | 71 ++++ xen/include/xen/hypercall.h | 6 xen/include/xen/kexec.h | 37 ++ xen/include/xen/mm.h | 1 30 files changed, 1254 insertions(+), 11 deletions(-)
linux-2.6-xen-sparse/drivers/xen/core/Makefile +1 -0
@@ -11,3 +11,4 @@ obj-$(CONFIG_XEN_SYSFS) += xen_sysfs.o obj-$(CONFIG_XEN_SKBUFF) += skbuff.o obj-$(CONFIG_XEN_REBOOT) += reboot.o obj-$(CONFIG_XEN_SMPBOOT) += smpboot.o +obj-$(CONFIG_KEXEC) += machine_kexec.o crash.o
linux-2.6-xen-sparse/drivers/xen/core/crash.c new file +44 -0
44 lines not on this page · raw message
linux-2.6-xen-sparse/drivers/xen/core/machine_kexec.c new file +80 -0
80 lines not on this page · raw message
linux-2.6-xen-sparse/drivers/xen/core/reboot.c +4 -0
@@ -65,6 +65,10 @@ void machine_power_off(void)HYPERVISOR_shutdown (SHUTDOWN_poweroff); } +#ifdef CONFIG_KEXEC +void machine_shutdown (void ) { } +#endif +int reboot_thru_bios =0 ;/* for dmi_scan.c */ EXPORT_SYMBOL (machine_restart);EXPORT_SYMBOL (machine_halt);
patches/linux-2.6.16.29/kexec-generic.patch new file +281 -0
281 lines not on this page · raw message
patches/linux-2.6.16.29/series +1 -0
@@ -1,3 +1,4 @@ +kexec-generic.patch blktap-aio-16_03_06.patch device_bind.patch fix-hz-suspend.patch
xen/arch/ia64/xen/Makefile +2 -0
@@ -1,3 +1,5 @@ +obj-y += machine_kexec.o +obj-y += crash.o obj-y += acpi.o obj-y += dom0_ops.o obj-y += domain.o
xen/arch/ia64/xen/crash.c new file +19 -0
@@ -0,0 +1,19 @@ +#include <xen/lib.h> /* for printk() used in stub */ +#include <xen/types.h> +#include <public/kexec.h> + +void machine_crash_shutdown (struct cpu_user_regs *regs) +{ +printk ("STUB: " __FILE__": %s: not implemented\n" , __FUNCTION__); +} + +/* +* Local variables: +* mode: C +* c-set-style: "BSD" +* c-basic-offset: 4 +* tab-width: 4 +* indent-tabs-mode: nil +* End: +*/ +
xen/arch/ia64/xen/machine_kexec.c new file +34 -0
@@ -0,0 +1,34 @@ +#include <xen/lib.h> /* for printk() used in stubs */ +#include <xen/types.h> +#include <public/kexec.h> + +int machine_kexec_load (int type,int slot,xen_kexec_image_t *image) +{ +printk ("STUB: " __FILE__": %s: not implemented\n" , __FUNCTION__); +return -1 ; +} + +void machine_kexec_unload (int type,int slot,xen_kexec_image_t *image) +{ +printk ("STUB: " __FILE__": %s: not implemented\n" , __FUNCTION__); +} + +void machine_kexec (xen_kexec_image_t *image) +{ +printk ("STUB: " __FILE__": %s: not implemented\n" , __FUNCTION__); +} + +void machine_shutdown (xen_kexec_image_t *image) +{ +printk ("STUB: " __FILE__": %s: not implemented\n" , __FUNCTION__); +} + +/* +* Local variables: +* mode: C +* c-set-style: "BSD" +* c-basic-offset: 4 +* tab-width: 4 +* indent-tabs-mode: nil +* End: +*/
xen/arch/powerpc/Makefile +2 -0
@@ -40,6 +40,8 @@ obj-y += smp-tbsync.o obj-y += sysctl.o obj-y += time.o obj-y += usercopy.o +obj-y += machine_kexec.o +obj-y += crash.o obj-$(debug) += 0opt.o obj-$(crash_debug) += gdbstub.o
xen/arch/powerpc/crash.c new file +19 -0
@@ -0,0 +1,19 @@ +#include <xen/lib.h> /* for printk() used in stub */ +#include <xen/types.h> +#include <public/kexec.h> + +void machine_crash_shutdown (struct cpu_user_regs *regs) +{ +printk ("STUB: " __FILE__": %s: not implemented\n" , __FUNCTION__); +} + +/* +* Local variables: +* mode: C +* c-set-style: "BSD" +* c-basic-offset: 4 +* tab-width: 4 +* indent-tabs-mode: nil +* End: +*/ +
xen/arch/powerpc/machine_kexec.c new file +34 -0
@@ -0,0 +1,34 @@ +#include <xen/lib.h> /* for printk() used in stubs */ +#include <xen/types.h> +#include <public/kexec.h> + +int machine_kexec_load (int type,int slot,xen_kexec_image_t *image) +{ +printk ("STUB: " __FILE__": %s: not implemented\n" , __FUNCTION__); +return -1 ; +} + +void machine_kexec_unload (int type,int slot,xen_kexec_image_t *image) +{ +printk ("STUB: " __FILE__": %s: not implemented\n" , __FUNCTION__); +} + +void machine_kexec (xen_kexec_image_t *image) +{ +printk ("STUB: " __FILE__": %s: not implemented\n" , __FUNCTION__); +} + +void machine_shutdown (xen_kexec_image_t *image) +{ +printk ("STUB: " __FILE__": %s: not implemented\n" , __FUNCTION__); +} + +/* +* Local variables: +* mode: C +* c-set-style: "BSD" +* c-basic-offset: 4 +* tab-width: 4 +* indent-tabs-mode: nil +* End: +*/
xen/arch/x86/Makefile +2 -0
@@ -41,6 +41,8 @@ obj-y += trampoline.o obj-y += traps.o obj-y += usercopy.o obj-y += x86_emulate.o +obj-y += machine_kexec.o +obj-y += crash.o obj-$(crash_debug) += gdbstub.o
xen/arch/x86/crash.c new file +19 -0
@@ -0,0 +1,19 @@ +#include <xen/lib.h> /* for printk() used in stub */ +#include <xen/types.h> +#include <public/kexec.h> + +void machine_crash_shutdown (struct cpu_user_regs *regs) +{ +printk ("STUB: " __FILE__": %s: not implemented\n" , __FUNCTION__); +} + +/* +* Local variables: +* mode: C +* c-set-style: "BSD" +* c-basic-offset: 4 +* tab-width: 4 +* indent-tabs-mode: nil +* End: +*/ +
xen/arch/x86/machine_kexec.c new file +34 -0
@@ -0,0 +1,34 @@ +#include <xen/lib.h> /* for printk() used in stubs */ +#include <xen/types.h> +#include <public/kexec.h> + +int machine_kexec_load (int type,int slot,xen_kexec_image_t *image) +{ +printk ("STUB: " __FILE__": %s: not implemented\n" , __FUNCTION__); +return -1 ; +} + +void machine_kexec_unload (int type,int slot,xen_kexec_image_t *image) +{ +printk ("STUB: " __FILE__": %s: not implemented\n" , __FUNCTION__); +} + +void machine_kexec (xen_kexec_image_t *image) +{ +printk ("STUB: " __FILE__": %s: not implemented\n" , __FUNCTION__); +} + +void machine_shutdown (xen_kexec_image_t *image) +{ +printk ("STUB: " __FILE__": %s: not implemented\n" , __FUNCTION__); +} + +/* +* Local variables: +* mode: C +* c-set-style: "BSD" +* c-basic-offset: 4 +* tab-width: 4 +* indent-tabs-mode: nil +* End: +*/
xen/common/Makefile +1 -0
@@ -7,6 +7,7 @@ obj-y += event_channel.o obj-y += grant_table.o obj-y += kernel.o obj-y += keyhandler.o +obj-y += kexec.o obj-y += lib.o obj-y += memory.o obj-y += multicall.o
xen/common/kexec.c new file +288 -0
288 lines not on this page · raw message
xen/common/page_alloc.c +22 -11
@@ -213,24 +213,35 @@ void init_boot_pages(paddr_t ps, paddr_t } } +unsigned long alloc_boot_pages_at (unsigned long nr_pfns,unsigned long pfn_at) +{ +unsigned long i; + +for ( i =0 ; i < nr_pfns; i++ ) +if (allocated_in_map (pfn_at + i) ) +break ; + +if ( i == nr_pfns ) + { +map_alloc (pfn_at, nr_pfns); +return pfn_at; + } + +return 0 ; +} +unsigned long alloc_boot_pages (unsigned long nr_pfns,unsigned long pfn_align) { -unsigned long pg, i; +unsigned long pg, i =0 ;for ( pg =0 ; (pg + nr_pfns) < max_page; pg += pfn_align ) { -for ( i =0 ; i < nr_pfns; i++ ) -if (allocated_in_map (pg + i) ) -break ; - -if ( i == nr_pfns ) - { -map_alloc (pg, nr_pfns); -return pg; - } + i =alloc_boot_pages_at (nr_pfns, pg); +if (i !=0 ) +break ; } -return 0 ; +return i; }
xen/drivers/char/console.c +3 -0
@@ -613,6 +613,7 @@ void panic(const char *fmt, ...)char buf[128 ];unsigned long flags;static DEFINE_SPINLOCK (lock); +extern void crash_kexec (struct cpu_user_regs *regs);debugtrace_dump ();
@@ -635,6 +636,8 @@ void panic(const char *fmt, ...)debugger_trap_immediate (); +crash_kexec (NULL ); +if ( opt_noreboot ) {machine_halt ();
xen/include/asm-ia64/elf.h new file +23 -0
@@ -0,0 +1,23 @@ +#ifndef __IA64_ELF_H__ +#define __IA64_ELF_H__ + +#include <xen/lib.h> /* for printk() used in stub */ + +#define ELF_NGREG 1/* XXX: Define to be at least as large as +however many register slots are needed when +crash notes are written during crash dump */ + +#define ELF_CORE_COPY_REGS (pr_reg, regs) \ + printk("STUB: " __FILE__ ": %s: not implemented\n", __FUNCTION__); + +#endif /* __IA64_ELF_H__ */ + +/* +* Local variables: +* mode: C +* c-set-style: "BSD" +* c-basic-offset: 4 +* tab-width: 4 +* indent-tabs-mode: nil +* End: +*/
xen/include/asm-ia64/kexec.h new file +31 -0
@@ -0,0 +1,31 @@ +#ifndef __IA64_KEXEC_H__ +#define __IA64_KEXEC_H__ + +#include <xen/lib.h> /* for printk() used in stub */ +#include <xen/types.h> +#include <public/xen.h> +#include <xen/kexec.h> + +static void crash_setup_regs (struct cpu_user_regs *newregs, +struct cpu_user_regs *oldregs) +{ +printk ("STUB: " __FILE__": %s: not implemented\n" , __FUNCTION__); +} + +static inline void machine_kexec (xen_kexec_image_t *image) +{ +printk ("STUB: " __FILE__": %s: not implemented\n" , __FUNCTION__); +} + +#endif /* __IA64_KEXEC_H__ */ + +/* +* Local variables: +* mode: C +* c-set-style: "BSD" +* c-basic-offset: 4 +* tab-width: 4 +* indent-tabs-mode: nil +* End: +*/ +
xen/include/asm-powerpc/elf.h new file +23 -0
@@ -0,0 +1,23 @@ +#ifndef _ASM_ELF_H__ +#define _ASM_ELF_H__ + +#include <xen/lib.h> /* for printk() used in stub */ + +#define ELF_NGREG 1/* XXX: Define to be at least as large as +however many register slots are needed when +crash notes are written during crash dump */ + +#define ELF_CORE_COPY_REGS (pr_reg, regs) \ + printk("STUB: " __FILE__ ": %s: not implemented\n", __FUNCTION__); + +#endif /* _ASM_ELF_H__ */ + +/* +* Local variables: +* mode: C +* c-set-style: "BSD" +* c-basic-offset: 4 +* tab-width: 4 +* indent-tabs-mode: nil +* End: +*/
xen/include/asm-powerpc/kexec.h new file +31 -0
@@ -0,0 +1,31 @@ +#ifndef _ASM_KEXEC_H__ +#define _ASM_KEXEC_H__ + +#include <xen/lib.h> /* for printk() used in stub */ +#include <xen/types.h> +#include <public/xen.h> +#include <xen/kexec.h> + +static void crash_setup_regs (struct cpu_user_regs *newregs, +struct cpu_user_regs *oldregs) +{ +printk ("STUB: " __FILE__": %s: not implemented\n" , __FUNCTION__); +} + +static inline void machine_kexec (xen_kexec_image_t *image) +{ +printk ("STUB: " __FILE__": %s: not implemented\n" , __FUNCTION__); +} + +#endif /* _ASM_KEXEC_H__ */ + +/* +* Local variables: +* mode: C +* c-set-style: "BSD" +* c-basic-offset: 4 +* tab-width: 4 +* indent-tabs-mode: nil +* End: +*/ +
xen/include/asm-x86/elf.h new file +23 -0
@@ -0,0 +1,23 @@ +#ifndef __X86_ELF_H__ +#define __X86_ELF_H__ + +#include <xen/lib.h> /* for printk() used in stub */ + +#define ELF_NGREG 1/* XXX: Define to be at least as large as +however many register slots are needed when +crash notes are written during crash dump */ + +#define ELF_CORE_COPY_REGS (pr_reg, regs) \ + printk("STUB: " __FILE__ ": %s: not implemented\n", __FUNCTION__); + +#endif /* __X86_ELF_H__ */ + +/* +* Local variables: +* mode: C +* c-set-style: "BSD" +* c-basic-offset: 4 +* tab-width: 4 +* indent-tabs-mode: nil +* End: +*/
xen/include/asm-x86/kexec.h new file +30 -0
@@ -0,0 +1,30 @@ +#ifndef __X86_KEXEC_H__ +#define __X86_KEXEC_H__ + +#include <xen/lib.h> /* for printk() used in stub */ +#include <xen/types.h> +#include <public/xen.h> +#include <xen/kexec.h> + +static void crash_setup_regs (struct cpu_user_regs *newregs, +struct cpu_user_regs *oldregs) +{ +printk ("STUB: " __FILE__": %s: not implemented\n" , __FUNCTION__); +} + +static inline void machine_kexec (xen_kexec_image_t *image) +{ +printk ("STUB: " __FILE__": %s: not implemented\n" , __FUNCTION__); +} + +#endif /* __X86_KEXEC_H__ */ + +/* +* Local variables: +* mode: C +* c-set-style: "BSD" +* c-basic-offset: 4 +* tab-width: 4 +* indent-tabs-mode: nil +* End: +*/
xen/include/public/kexec.h new file +88 -0
88 lines not on this page · raw message
xen/include/xen/elfcore.h new file +71 -0
71 lines not on this page · raw message
xen/include/xen/hypercall.h +6 -0
@@ -102,4 +102,10 @@ do_hvm_op( unsigned long op, XEN_GUEST_HANDLE(void) arg); +extern long +do_kexec_op ( +unsigned long op, +int arg1, +XEN_GUEST_HANDLE (void ) arg); +#endif /* __XEN_HYPERCALL_H__ */
xen/include/xen/kexec.h new file +37 -0
@@ -0,0 +1,37 @@ +#ifndef __XEN_KEXEC_H__ +#define __XEN_KEXEC_H__ + +#include <public/kexec.h> +#include <asm/percpu.h> + +#define MAX_NOTE_BYTES 1024 + +typedef u32 note_buf_t [MAX_NOTE_BYTES /4 ]; +DECLARE_PER_CPU (note_buf_t, crash_notes); + +/* We have space for 4 images to support atomic update +* of images. This is important for CRASH images since +* a panic can happen at any time... +*/ + +#define KEXEC_IMAGE_DEFAULT_BASE 0 +#define KEXEC_IMAGE_CRASH_BASE 2 +#define KEXEC_IMAGE_NR 4 + +int machine_kexec_load (int type,int slot,xen_kexec_image_t *image); +void machine_kexec_unload (int type,int slot,xen_kexec_image_t *image); +void machine_kexec_reserved (xen_kexec_reserve_t *reservation); +void machine_shutdown (xen_kexec_image_t *image); +void machine_crash_shutdown (cpu_user_regs_t *regs); + +#endif /* __XEN_KEXEC_H__ */ + +/* +* Local variables: +* mode: C +* c-set-style: "BSD" +* c-basic-offset: 4 +* tab-width: 4 +* indent-tabs-mode: nil +* End: +*/
xen/include/xen/mm.h +1 -0
@@ -40,6 +40,7 @@ struct page_info;paddr_t init_boot_allocator (paddr_t bitmap_start);void init_boot_pages (paddr_t ps,paddr_t pe);unsigned long alloc_boot_pages (unsigned long nr_pfns,unsigned long pfn_align); +unsigned long alloc_boot_pages_at (unsigned long nr_pfns,unsigned long pfn_at);void end_boot_allocator (void );/* Generic allocator. These functions are *not* interrupt-safe. */
PATCH 2/4 Kexec / Kdump: Code shared between x86_32 and x86_64
In reply to Magnus Damm[PATCH 02/04] Kexec / Kdump: Code shared between x86_32 and x86_64
This patch contains Kexec / Kdump code shared between x86_32 and x86_64.
---
Applies on top of xen-unstable-11856.
patches/linux-2.6.16.29/git-2a...f7.patch | 62 ++ patches/linux-2.6.16.29/git-2e...11.patch | 93 ++++ patches/linux-2.6.16.29/series | 2 xen/arch/x86/crash.c | 227 +++++++++- xen/arch/x86/machine_kexec.c | 83 +++ xen/arch/x86/setup.c | 73 ++- xen/arch/x86/traps.c | 3 xen/include/asm-x86/elf.h | 13 xen/include/asm-x86/fixmap.h | 4 xen/include/asm-x86/hypercall.h | 5 xen/include/asm-x86/kexec.h | 20 xen/include/asm-x86/x86_32/elf.h | 23 + xen/include/asm-x86/x86_32/kexec.h | 43 + xen/include/asm-x86/x86_64/elf.h | 23 + xen/include/asm-x86/x86_64/kexec.h | 30 + xen/include/public/kexec.h | 7 16 files changed, 666 insertions(+), 45 deletions(-)
patches/linux-2.6.16.29/git-2a8a3d5b65e86ec1dfef7d268c64a909eab94af7.patch new file +62 -0
@@ -0,0 +1,62 @@ +From: Eric W. Biederman <[email protected]> +Date: Sun, 30 Jul 2006 10:03:20 +0000 (-0700) +Subject: [PATCH] machine_kexec.c: Fix the description of segment handling +X-Git-Tag: v2.6.18-rc4 +X-Git-Url: http://www.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=2a8a3d5b65e86ec1dfef7d268c64a909eab94af7 + +[PATCH] machine_kexec.c: Fix the description of segment handling + +One of my original comments in machine_kexec was unclear +and this should fix it. + +Signed-off-by: Eric W. Biederman <[email protected]> +Cc: Andi Kleen <[email protected]> +Acked-by: Horms <[email protected]> +Signed-off-by: Andrew Morton <[email protected]> +Signed-off-by: Linus Torvalds <[email protected]> +--- + +--- a/arch/i386/kernel/machine_kexec.c ++++ b/arch/i386/kernel/machine_kexec.c +@@ -189,14 +189,11 @@ NORET_TYPE void machine_kexec(struct kim + memcpy((void *)reboot_code_buffer, relocate_new_kernel, + relocate_new_kernel_size); + +- /* The segment registers are funny things, they are +- * automatically loaded from a table, in memory wherever you +- * set them to a specific selector, but this table is never +- * accessed again you set the segment to a different selector. +- * +- * The more common model is are caches where the behide +- * the scenes work is done, but is also dropped at arbitrary +- * times. ++ /* The segment registers are funny things, they have both a ++ * visible and an invisible part. Whenever the visible part is ++ * set to a specific selector, the invisible part is loaded ++ * with from a table in memory. At no other time is the ++ * descriptor table in memory accessed. + * + * I take advantage of this here by force loading the + * segments, before I zap the gdt with an invalid value. +--- a/arch/x86_64/kernel/machine_kexec.c ++++ b/arch/x86_64/kernel/machine_kexec.c +@@ -207,14 +207,11 @@ NORET_TYPE void machine_kexec(struct kim + __flush_tlb(); + + +- /* The segment registers are funny things, they are +- * automatically loaded from a table, in memory wherever you +- * set them to a specific selector, but this table is never +- * accessed again unless you set the segment to a different selector. +- * +- * The more common model are caches where the behide +- * the scenes work is done, but is also dropped at arbitrary +- * times. ++ /* The segment registers are funny things, they have both a ++ * visible and an invisible part. Whenever the visible part is ++ * set to a specific selector, the invisible part is loaded ++ * with from a table in memory. At no other time is the ++ * descriptor table in memory accessed. + * + * I take advantage of this here by force loading the + * segments, before I zap the gdt with an invalid value.
patches/linux-2.6.16.29/git-2efe55a9cec8418f0e0cde3dc3787a42fddc4411.patch new file +93 -0
93 lines not on this page · raw message
patches/linux-2.6.16.29/series +2 -0
@@ -1,4 +1,6 @@ kexec-generic.patch +git-2efe55a9cec8418f0e0cde3dc3787a42fddc4411.patch +git-2a8a3d5b65e86ec1dfef7d268c64a909eab94af7.patch blktap-aio-16_03_06.patch device_bind.patch fix-hz-suspend.patch
xen/arch/x86/crash.c +224 -3
234 lines not on this page · raw message
xen/arch/x86/machine_kexec.c +73 -10
99 lines not on this page · raw message
xen/arch/x86/setup.c +64 -9
103 lines not on this page · raw message
xen/arch/x86/traps.c +3 -0
@@ -105,6 +105,8 @@ unsigned long do_get_debugreg(int reg);static int debug_stack_lines =20 ;integer_param ("debug_stack_lines" , debug_stack_lines); +extern void crash_kexec (struct cpu_user_regs *regs); +#ifdef CONFIG_X86_32 #define stack_words_per_line 8#define ESP_BEFORE_EXCEPTION (regs) ((unsigned long *)®s->esp)
@@ -1595,6 +1597,7 @@ static void unknown_nmi_error(unsigned cprintk ("Uhhuh. NMI received for unknown reason %02x.\n" , reason);printk ("Dazed and confused, but trying to continue\n" );printk ("Do you have a strange power saving mode enabled?\n" ); +crash_kexec (NULL ); } }
xen/include/asm-x86/elf.h +5 -8
@@ -1,14 +1,11 @@#ifndef __X86_ELF_H__#define __X86_ELF_H__ -#include <xen/lib.h> /* for printk() used in stub */ - -#define ELF_NGREG 1/* XXX: Define to be at least as large as -however many register slots are needed when -crash notes are written during crash dump */ - -#define ELF_CORE_COPY_REGS (pr_reg, regs) \ - printk("STUB: " __FILE__ ": %s: not implemented\n", __FUNCTION__); +#ifdef __x86_64__ +#include <asm/x86_64/elf.h> +#else +#include <asm/x86_32/elf.h> +#endif #endif /* __X86_ELF_H__ */
xen/include/asm-x86/fixmap.h +4 -0
@@ -16,6 +16,7 @@#include <asm/apicdef.h> #include <asm/acpi.h> #include <asm/page.h> +#include <xen/kexec.h> /* * Here we define all the compile-time 'special' virtual
@@ -36,6 +37,9 @@ enum fixed_addresses {FIX_ACPI_END =FIX_ACPI_BEGIN +FIX_ACPI_PAGES -1 ,FIX_HPET_BASE ,FIX_CYCLONE_TIMER , +FIX_KEXEC_BASE_0 , +FIX_KEXEC_BASE_END =FIX_KEXEC_BASE_0 \ + + ((KEXEC_XEN_NO_PAGES >>1 ) *KEXEC_IMAGE_NR ) -1 , __end_of_fixed_addresses };
xen/include/asm-x86/hypercall.h +5 -0
@@ -6,6 +6,7 @@#define __ASM_X86_HYPERCALL_H__#include <public/physdev.h> +#include <xen/types.h> extern long do_event_channel_op_compat(
@@ -87,6 +88,10 @@ extern longarch_do_vcpu_op ( int cmd, struct vcpu *v, XEN_GUEST_HANDLE(void) arg); +extern int +do_kexec ( +unsigned long op,unsigned arg1,XEN_GUEST_HANDLE (void ) uarg); +#ifdef __x86_64__ extern long
xen/include/asm-x86/kexec.h +5 -15
@@ -1,21 +1,11 @@#ifndef __X86_KEXEC_H__#define __X86_KEXEC_H__ -#include <xen/lib.h> /* for printk() used in stub */ -#include <xen/types.h> -#include <public/xen.h> -#include <xen/kexec.h> - -static void crash_setup_regs (struct cpu_user_regs *newregs, -struct cpu_user_regs *oldregs) -{ -printk ("STUB: " __FILE__": %s: not implemented\n" , __FUNCTION__); -} - -static inline void machine_kexec (xen_kexec_image_t *image) -{ -printk ("STUB: " __FILE__": %s: not implemented\n" , __FUNCTION__); -} +#ifdef __x86_64__ +#include <asm/x86_64/kexec.h> +#else +#include <asm/x86_32/kexec.h> +#endif #endif /* __X86_KEXEC_H__ */
xen/include/asm-x86/x86_32/elf.h new file +23 -0
@@ -0,0 +1,23 @@ +#ifndef __X86_32_ELF_H__ +#define __X86_32_ELF_H__ + +#include <xen/lib.h> /* for printk() used in stub */ + +#define ELF_NGREG 1/* XXX: Define to be at least as large as +however many register slots are needed when +crash notes are written during crash dump */ + +#define ELF_CORE_COPY_REGS (pr_reg, regs) \ + printk("STUB: " __FILE__ ": %s: not implemented\n", __FUNCTION__); + +#endif /* __X86_32_ELF_H__ */ + +/* +* Local variables: +* mode: C +* c-set-style: "BSD" +* c-basic-offset: 4 +* tab-width: 4 +* indent-tabs-mode: nil +* End: +*/
xen/include/asm-x86/x86_32/kexec.h new file +43 -0
43 lines not on this page · raw message
xen/include/asm-x86/x86_64/elf.h new file +23 -0
@@ -0,0 +1,23 @@ +#ifndef __X86_64_ELF_H__ +#define __X86_64_ELF_H__ + +#include <xen/lib.h> /* for printk() used in stub */ + +#define ELF_NGREG 1/* XXX: Define to be at least as large as +however many register slots are needed when +crash notes are written during crash dump */ + +#define ELF_CORE_COPY_REGS (pr_reg, regs) \ + printk("STUB: " __FILE__ ": %s: not implemented\n", __FUNCTION__); + +#endif /* __X86_64_ELF_H__ */ + +/* +* Local variables: +* mode: C +* c-set-style: "BSD" +* c-basic-offset: 4 +* tab-width: 4 +* indent-tabs-mode: nil +* End: +*/
xen/include/asm-x86/x86_64/kexec.h new file +30 -0
@@ -0,0 +1,30 @@ +#ifndef __X86_64_KEXEC_H__ +#define __X86_64_KEXEC_H__ + +#include <xen/lib.h> /* for printk() used in stub */ +#include <xen/types.h> +#include <public/xen.h> +#include <xen/kexec.h> + +static inline void crash_setup_regs (struct cpu_user_regs *newregs, +struct cpu_user_regs *oldregs) +{ +printk ("STUB: " __FILE__": %s: not implemented\n" , __FUNCTION__); +} + +static inline void machine_kexec (xen_kexec_image_t *image) +{ +printk ("STUB: " __FILE__": %s: not implemented\n" , __FUNCTION__); +} + +#endif /* __X86_64_KEXEC_H__ */ + +/* +* Local variables: +* mode: C +* c-set-style: "BSD" +* c-basic-offset: 4 +* tab-width: 4 +* indent-tabs-mode: nil +* End: +*/
xen/include/public/kexec.h +7 -0
@@ -11,6 +11,10 @@#include "xen.h" +#if defined(__i386__) || defined(__x86_64__) +#define KEXEC_XEN_NO_PAGES 17 +#endif +/* * Prototype for this hypercall is: * int kexec_op(int cmd, void *args)
@@ -23,6 +27,9 @@#define KEXEC_TYPE_CRASH 1typedef struct xen_kexec_image { +#if defined(__i386__) || defined(__x86_64__) +unsigned long page_list[KEXEC_XEN_NO_PAGES ]; +#endif unsigned long indirection_page;unsigned long start_address; }xen_kexec_image_t ;
PATCH 3/4 Kexec / Kdump: x86_32 specific code
In reply to Magnus Damm[PATCH 03/04] Kexec / Kdump: x86_32 specific code
This patch contains the x86_32 implementation of Kexec / Kdump for Xen.
---
Applies on top of xen-unstable-11856.
buildconfigs/linux-defconfig_xen_x86_32 | 2 linux-2.6-xen-sparse/arch/i386/Kconfig | 2 linux-2.6-xen-sparse/arch/i386/kernel/Makefile | 2 linux-2.6-xen-sparse/arch/i386/kernel/setup-xen.c | 25 linux-2.6-xen-sparse/include/asm-i386/kexec-xen.h | 51 + linux-2.6-xen-sparse/include/asm-i386/mach-xen/asm/hypercall.h | 8 patches/linux-2.6.16.29/git-35...c9.patch | 401 +++++++ patches/linux-2.6.16.29/linux-2.6.19-rc1-kexec..code-i386.patch | 169 +++ patches/linux-2.6.16.29/linux-2.6.19-rc1-kexec-xen-i386.patch | 54 + patches/linux-2.6.16.29/series | 3 xen/arch/x86/x86_32/entry.S | 2 xen/include/asm-x86/x86_32/elf.h | 37 xen/include/asm-x86/x86_32/kexec.h | 84 +- 13 files changed, 817 insertions(+), 23 deletions(-)
buildconfigs/linux-defconfig_xen_x86_32 +2 -0
@@ -183,6 +183,7 @@ CONFIG_MTRR=y CONFIG_REGPARM=y CONFIG_SECCOMP=y CONFIG_HZ_100=y +CONFIG_KEXEC=y # CONFIG_HZ_250 is not set # CONFIG_HZ_1000 is not set CONFIG_HZ=100
@@ -1036,6 +1037,7 @@ CONFIG_DNOTIFY=y # CONFIG_PROC_FS=y CONFIG_PROC_KCORE=y +# CONFIG_PROC_VMCORE is not set CONFIG_SYSFS=y CONFIG_TMPFS=y # CONFIG_HUGETLB_PAGE is not set
linux-2.6-xen-sparse/arch/i386/Kconfig +1 -1
@@ -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
linux-2.6-xen-sparse/arch/i386/kernel/Makefile +1 -1
@@ -89,7 +89,7 @@ include $(srctree)/scripts/Makefile.xen obj-y += fixup.o microcode-$(subst m,y,$(CONFIG_MICROCODE)) := microcode-xen.o -n-obj-xen := i8259.o timers/ reboot.o smpboot.o trampoline.o +n-obj-xen := i8259.o timers/ reboot.o smpboot.o trampoline.o crash.o obj-y := $(call filterxen, $(obj-y), $(n-obj-xen)) obj-y := $(call cherrypickxen, $(obj-y))
linux-2.6-xen-sparse/arch/i386/kernel/setup-xen.c +24 -1
@@ -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 (* 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 ( 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,9 +1331,22 @@ void __init setup_bootmem_allocator(void }#endif #ifdef CONFIG_KEXEC +#ifndef CONFIG_XEN if (crashk_res.start != crashk_res.end)reserve_bootmem (crashk_res.start, crashk_res.end - crashk_res.start +1 ); +#else + { +xen_kexec_reserve_t reservation; +BUG_ON (HYPERVISOR_kexec_op (KEXEC_CMD_kexec_reserve, + &reservation)); +if (reservation.size) { + crashk_res.start = reservation.start; + crashk_res.end = reservation.start + + reservation.size -1 ; + } + } +#endif #endif if (!xen_feature (XENFEAT_auto_translated_physmap))
@@ -1389,7 +1411,8 @@ legacy_init_iomem_resources(struct e820erequest_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);#endif } }
linux-2.6-xen-sparse/include/asm-i386/kexec-xen.h new file +51 -0
51 lines not on this page · raw message
linux-2.6-xen-sparse/include/asm-i386/mach-xen/asm/hypercall.h +8 -0
@@ -385,5 +385,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__ */
patches/linux-2.6.16.29/git-3566561bfadffcb5dbc85d576be80c0dbf2cccc9.patch new file +401 -0
401 lines not on this page · raw message
patches/linux-2.6.16.29/linux-2.6.19-rc1-kexec-move_segment_code-i386.patch new file +169 -0
169 lines not on this page · raw message
patches/linux-2.6.16.29/linux-2.6.19-rc1-kexec-xen-i386.patch new file +54 -0
54 lines not on this page · raw message
patches/linux-2.6.16.29/series +3 -0
@@ -1,6 +1,9 @@ kexec-generic.patch git-2efe55a9cec8418f0e0cde3dc3787a42fddc4411.patch git-2a8a3d5b65e86ec1dfef7d268c64a909eab94af7.patch +git-3566561bfadffcb5dbc85d576be80c0dbf2cccc9.patch +linux-2.6.19-rc1-kexec-move_segment_code-i386.patch +linux-2.6.19-rc1-kexec-xen-i386.patch blktap-aio-16_03_06.patch device_bind.patch fix-hz-suspend.patch
xen/arch/x86/x86_32/entry.S +2 -0
@@ -672,6 +672,7 @@ ENTRY(hypercall_table) .long do_hvm_op .long do_sysctl /* 35 */ .long do_domctl + .long do_kexec_op .rept NR_hypercalls-((.-hypercall_table)/4) .long do_ni_hypercall .endr
@@ -714,6 +715,7 @@ ENTRY(hypercall_args_table) .byte 2 /* do_hvm_op */ .byte 1 /* do_sysctl */ /* 35 */ .byte 1 /* do_domctl */ + .byte 2 /* do_kexec_op */ .rept NR_hypercalls-(.-hypercall_args_table) .byte 0 /* do_ni_hypercall */ .endr
xen/include/asm-x86/x86_32/elf.h +31 -6
@@ -1,14 +1,39 @@ +/* +* Based heavily on include/asm-i386/elf.h and +* include/asm-i386/system.h from Linux 2.6.16 +*/ +#ifndef __X86_32_ELF_H__#define __X86_32_ELF_H__ -#include <xen/lib.h> /* for printk() used in stub */ +#define ELF_NGREG 17 -#define ELF_NGREG 1/* XXX: Define to be at least as large as -however many register slots are needed when -crash notes are written during crash dump */ +/* XXX: Xen doesn't have orig_eax. For kdump, on a dom0 crash, the values +* for the crashing CPU could could be passed down from dom0, but is that +* neccessary? +* Also, I'm not sure why fs and gs are derived from the CPU +* rather than regs */ -#define ELF_CORE_COPY_REGS (pr_reg, regs) \ - printk("STUB: " __FILE__ ": %s: not implemented\n", __FUNCTION__); +#define ELF_CORE_COPY_REGS (pr_reg, regs) do { \ + unsigned i; \ + pr_reg[0] = regs->ebx; \ + pr_reg[1] = regs->ecx; \ + pr_reg[2] = regs->edx; \ + pr_reg[3] = regs->esi; \ + pr_reg[4] = regs->edi; \ + pr_reg[5] = regs->ebp; \ + pr_reg[6] = regs->eax; \ + pr_reg[7] = regs->ds; \ + pr_reg[8] = regs->es; \ + asm volatile("mov %%fs,%0":"=rm" (i)); pr_reg[9] = i; \ + asm volatile("mov %%gs,%0":"=rm" (i)); pr_reg[10] = i; \ + pr_reg[11] = 0;/* regs->orig_eax; */ \ + pr_reg[12 ] = regs->eip; \ + pr_reg[13 ] = regs->cs; \ + pr_reg[14 ] = regs->eflags; \ + pr_reg[15 ] = regs->esp; \ + pr_reg[16 ] = regs->ss; \ +} while(0);#endif /* __X86_32_ELF_H__ */
xen/include/asm-x86/x86_32/kexec.h +70 -14
106 lines not on this page · raw message
PATCH 4/4 Kexec / Kdump: x86_64 specific code
In reply to Magnus Damm[PATCH 04/04] Kexec / Kdump: x86_64 specific code
This patch contains the x86_64 implementation of Kexec / Kdump for Xen.
---
Applies on top of xen-unstable-11856.
buildconfigs/linux-defconfig_xen_x86_64 | 1 linux-2.6-xen-sparse/arch/x86_64/Kconfig | 2 linux-2.6-xen-sparse/arch/x86_64/kernel/Makefile | 2 linux-2.6-xen-sparse/arch/x86_64/kernel/setup-xen.c | 27 linux-2.6-xen-sparse/include/asm-x86_64/kexec-xen.h | 64 + linux-2.6-xen-sparse/include/asm-x86_64/mach-xen/asm/hypercall.h | 7 linux-2.6-xen-sparse/include/asm-x86_64/mach-xen/asm/ptrace.h | 2 patches/linux-2.6.16.29/git-4b...1f.patch | 375 ++++ patches/linux-2.6.16.29/linux-2.6.19-rc1-kexec..code-x86_64.patch | 161 ++ patches/linux-2.6.16.29/linux-2.6.19-rc1-kexec-xen-x86_64.patch | 162 ++ patches/linux-2.6.16.29/series | 3 xen/arch/x86/x86_64/entry.S | 2 xen/include/asm-x86/x86_64/elf.h | 49 + xen/include/asm-x86/x86_64/kexec.h | 60 + 14 files changed, 903 insertions(+), 14 deletions(-)
buildconfigs/linux-defconfig_xen_x86_64 +1 -0
@@ -138,6 +138,7 @@ CONFIG_SWIOTLB=y CONFIG_PHYSICAL_START=0x100000 CONFIG_SECCOMP=y CONFIG_HZ_100=y +CONFIG_KEXEC=y # CONFIG_HZ_250 is not set # CONFIG_HZ_1000 is not set CONFIG_HZ=100
linux-2.6-xen-sparse/arch/x86_64/Kconfig +1 -1
@@ -435,7 +435,7 @@ config X86_MCE_AMD config KEXEC bool "kexec system call (EXPERIMENTAL)" - depends on EXPERIMENTAL && !X86_64_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
linux-2.6-xen-sparse/arch/x86_64/kernel/Makefile +1 -1
@@ -59,7 +59,7 @@ pci-dma-y += ../../i386/kernel/pci-dma microcode-$(subst m,y,$(CONFIG_MICROCODE)) := ../../i386/kernel/microcode-xen.o quirks-y := ../../i386/kernel/quirks-xen.o -n-obj-xen := i8259.o reboot.o i8237.o smpboot.o trampoline.o +n-obj-xen := i8259.o reboot.o i8237.o smpboot.o trampoline.o crash.o include $(srctree)/scripts/Makefile.xen
linux-2.6-xen-sparse/arch/x86_64/kernel/setup-xen.c +27 -0
@@ -80,6 +80,10 @@#include <asm/mach-xen/setup_arch_post.h> #include <xen/interface/memory.h> +#ifdef CONFIG_XEN +#include <xen/interface/kexec.h> +#endif +extern unsigned long start_pfn;extern struct edid_info edid_info;
@@ -450,6 +454,7 @@ static __init void parse_cmdline_early (* after a kernel panic. */ else if (!memcmp(from, "crashkernel=", 12)) { +#ifndef CONFIG_XEN unsigned long size, base; size =memparse (from+12 , &from);if (*from =='@' ) {
@@ -460,6 +465,10 @@ static __init void parse_cmdline_early ( 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
@@ -812,10 +821,23 @@ void __init setup_arch(char **cmdline_p)#endif #endif /* !CONFIG_XEN */ #ifdef CONFIG_KEXEC +#ifndef CONFIG_XEN if (crashk_res.start != crashk_res.end) {reserve_bootmem (crashk_res.start, crashk_res.end - crashk_res.start +1 ); } +#else + { +xen_kexec_reserve_t reservation; +BUG_ON (HYPERVISOR_kexec_op (KEXEC_CMD_kexec_reserve, + &reservation)); +if (reservation.size) { + crashk_res.start = reservation.start; + crashk_res.end = reservation.start + + reservation.size -1 ; + } + } +#endif #endif paging_init ();
@@ -954,6 +976,11 @@ void __init setup_arch(char **cmdline_p)iommu_hole_init ();#endif +#ifdef CONFIG_KEXEC +if (crashk_res.start != crashk_res.end) +request_resource (&ioport_resource, &crashk_res); +#endif +#ifdef CONFIG_XEN {struct physdev_set_iopl set_iopl;
linux-2.6-xen-sparse/include/asm-x86_64/kexec-xen.h new file +64 -0
64 lines not on this page · raw message
linux-2.6-xen-sparse/include/asm-x86_64/mach-xen/asm/hypercall.h +7 -0
@@ -386,4 +386,11 @@ 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__ */
linux-2.6-xen-sparse/include/asm-x86_64/mach-xen/asm/ptrace.h +2 -0
@@ -90,6 +90,8 @@ extern unsigned long profile_pc(struct p#define profile_pc (regs) instruction_pointer(regs)#endif +#include <linux/compiler.h> +void signal_fault (struct pt_regs *regs,void __user *frame,char *where);struct task_struct ;
patches/linux-2.6.16.29/git-4bfaaef01a1badb9e8ffb0c0a37cd2379008d21f.patch new file +375 -0
375 lines not on this page · raw message
patches/linux-2.6.16.29/linux-2.6.19-rc1-kexec-move_segment_code-x86_64.patch new file +161 -0
161 lines not on this page · raw message
patches/linux-2.6.16.29/linux-2.6.19-rc1-kexec-xen-x86_64.patch new file +162 -0
162 lines not on this page · raw message
patches/linux-2.6.16.29/series +3 -0
@@ -4,6 +4,9 @@ git-2a8a3d5b65e86ec1dfef7d268c64a909eab9 git-3566561bfadffcb5dbc85d576be80c0dbf2cccc9.patch linux-2.6.19-rc1-kexec-move_segment_code-i386.patch linux-2.6.19-rc1-kexec-xen-i386.patch +git-4bfaaef01a1badb9e8ffb0c0a37cd2379008d21f.patch +linux-2.6.19-rc1-kexec-move_segment_code-x86_64.patch +linux-2.6.19-rc1-kexec-xen-x86_64.patch blktap-aio-16_03_06.patch device_bind.patch fix-hz-suspend.patch
xen/arch/x86/x86_64/entry.S +2 -0
@@ -573,6 +573,7 @@ ENTRY(hypercall_table) .quad do_hvm_op .quad do_sysctl /* 35 */ .quad do_domctl + .quad do_kexec_op .rept NR_hypercalls-((.-hypercall_table)/8) .quad do_ni_hypercall .endr
@@ -615,6 +616,7 @@ ENTRY(hypercall_args_table) .byte 2 /* do_hvm_op */ .byte 1 /* do_sysctl */ /* 35 */ .byte 1 /* do_domctl */ + .byte 2 /* do_kexec */ .rept NR_hypercalls-(.-hypercall_args_table) .byte 0 /* do_ni_hypercall */ .endr
xen/include/asm-x86/x86_64/elf.h +43 -6
57 lines not on this page · raw message
xen/include/asm-x86/x86_64/kexec.h +54 -6
74 lines not on this page · raw message
Quoted 3 lines · Magnus Damm
20060931 - Take XIV for xen-unstable-11296 posted by Simon Horman
Enjoy!
A couple of comments on this patchset:
Firstly, the new public header file is nicely laid out and commented but it'd be nice to add some comments to the KEXEC_TYPE_* definitions explaining what they mean. Also the same for xen_kexec_image_t (what do indirection_page and start_address mean?). As far as possible it would be good to have an explanation of the Xen kexec interface that stands alone and allows independent implementation to that interface (e.g., in Solaris) with as little need to crib from other kexec implementations as possible. So, for example, adding a short 'story board' comment explaining the sequence of hypercalls that would be used to set up and execute a kdump or kexec would be useful. It would be very hard to add *too many* helpful comments. :-)
Secondly, you appear to stuff over 1000 lines of code into the patches/ directory. What is that all about? Will it go away when we move to a more recent Linux kernel (which would be an argument to hold off on merging until we have done that)?
-- Keir
Hi Keir!
I thought that my latest patchset ended up in a spam filter somewhere, but it seems like it finally made it through to xen-devel!
Quoted 21 lines · Keir Fraser
Quoted 3 lines · Magnus Damm
20060931 - Take XIV for xen-unstable-11296 posted by Simon Horman
Enjoy!
A couple of comments on this patchset:
Firstly, the new public header file is nicely laid out and commented but
it'd be nice to add some comments to the KEXEC_TYPE_* definitions explaining
what they mean. Also the same forxen_kexec_image_t(what doindirection_pageandstart_addressmean?). As far as possible it would be
good to have an explanation of the Xen kexec interface that stands alone and
allows independent implementation to that interface (e.g., in Solaris) with
Quoted 8 lines
as little need to crib from other kexec implementations as possible. So, for
example, adding a short 'story board' comment explaining the sequence of
hypercalls that would be used to set up and execute a kdump or kexec would
be useful. It would be very hard to add *too many* helpful comments. :-)
Yeah, you can never have too many comments. I definitely agree that some kind of story board would be nice too.
In theory it should be possible to add an independent implementation that works with our interface, but the values passed are quite tightly bound together with the current kexec implementation. A good example of that is the indirection_page which is a list of pages and their destination addresses. This page together with the start_address is used by the code page, ie the page that is passed in page_list[0]. But we don't actually touch that much data in the hypervisor, we just pass the data along to the code in the code page that does the rest for us.
But more documentation, yes - added to the TODO list.
Quoted 7 lines
Secondly, you appear to stuff over 1000 lines of code into the patches/
directory. What is that all about? Will it go away when we move to a more
recent Linux kernel (which would be an argument to hold off on merging until
we have done that)?
All the git-<nnn>.patch-patches are taken from Linus git tree. They are patches that are merged in 2.6.19-rc1. Some of the patches are needed, and a few are pushed in just to make the other ones apply.
So yes, patches will go away. At least most of them. I have not started trying to merge the other smaller patches yet. It is kind of difficult to get things merged upstream when Xen is not merged yet. But if I could say that my changes are merged into Xen then it would probably be easier... =)
I don't think see why you should wait with the merge. But it's your call of course. My plan is to address the issues you pointed out together with some kdump fixes and resend early next week. How does that work with the grand merge plan?
Thanks!
/ magnus