debuggers.hg
changeset 22712:cb756381087c
kexec: correct _domain offset info in elf-notes
The hypervisor writes some data structure infos into the elf note
section of the vmcore to enable interpretation of the xen structures
by kexec/kdump.
The info of the offset of _domain in page_info was just wrong on
non-ia64 systems.
Signed-off-by: Juergen Gross <juergen.gross@ts.fujitsu.com>
The hypervisor writes some data structure infos into the elf note
section of the vmcore to enable interpretation of the xen structures
by kexec/kdump.
The info of the offset of _domain in page_info was just wrong on
non-ia64 systems.
Signed-off-by: Juergen Gross <juergen.gross@ts.fujitsu.com>
author | Keir Fraser <keir@xen.org> |
---|---|
date | Thu Jan 06 19:02:36 2011 +0000 (2011-01-06) |
parents | e18d9af29d2a |
children | f14b296d263f |
files | xen/common/kexec.c xen/include/xen/kexec.h |
line diff
1.1 --- a/xen/common/kexec.c Thu Jan 06 18:04:48 2011 +0000 1.2 +++ b/xen/common/kexec.c Thu Jan 06 19:02:36 2011 +0000 1.3 @@ -465,7 +465,11 @@ static void crash_save_vmcoreinfo(void) 1.4 VMCOREINFO_STRUCT_SIZE(domain); 1.5 1.6 VMCOREINFO_OFFSET(page_info, count_info); 1.7 - VMCOREINFO_OFFSET_ALIAS(page_info, u, _domain); 1.8 +#ifdef __ia64__ 1.9 + VMCOREINFO_OFFSET_SUB(page_info, u.inuse, _domain); 1.10 +#else 1.11 + VMCOREINFO_OFFSET_SUB(page_info, v.inuse, _domain); 1.12 +#endif 1.13 VMCOREINFO_OFFSET(domain, domain_id); 1.14 VMCOREINFO_OFFSET(domain, next_in_list); 1.15
2.1 --- a/xen/include/xen/kexec.h Thu Jan 06 18:04:48 2011 +0000 2.2 +++ b/xen/include/xen/kexec.h Thu Jan 06 19:02:36 2011 +0000 2.3 @@ -52,9 +52,9 @@ void vmcoreinfo_append_str(const char *f 2.4 #define VMCOREINFO_OFFSET(name, field) \ 2.5 vmcoreinfo_append_str("OFFSET(%s.%s)=%lu\n", #name, #field, \ 2.6 (unsigned long)offsetof(struct name, field)) 2.7 -#define VMCOREINFO_OFFSET_ALIAS(name, field, alias) \ 2.8 - vmcoreinfo_append_str("OFFSET(%s.%s)=%lu\n", #name, #alias, \ 2.9 - (unsigned long)offsetof(struct name, field)) 2.10 +#define VMCOREINFO_OFFSET_SUB(name, sub, field) \ 2.11 + vmcoreinfo_append_str("OFFSET(%s.%s)=%lu\n", #name, #field, \ 2.12 + (unsigned long)offsetof(struct name, sub.field)) 2.13 2.14 #endif /* __XEN_KEXEC_H__ */ 2.15