# HG changeset patch # User Juergen Gross # Date 1294238626 -3600 # Node ID e2027af5f4b57392bd829380b474e6a8b9d0ecce # Parent 39194f457534e07e5d5cc54376c4df28e0acb63c 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. Attached patch corrects this. Signed-off-by: juergen.gross@xxxxxxxxxxxxxx diff -r 39194f457534 -r e2027af5f4b5 xen/common/kexec.c --- a/xen/common/kexec.c Wed Jan 05 09:57:15 2011 +0000 +++ b/xen/common/kexec.c Wed Jan 05 15:43:46 2011 +0100 @@ -465,7 +465,11 @@ static void crash_save_vmcoreinfo(void) VMCOREINFO_STRUCT_SIZE(domain); VMCOREINFO_OFFSET(page_info, count_info); - VMCOREINFO_OFFSET_ALIAS(page_info, u, _domain); +#ifdef __ia64__ + VMCOREINFO_OFFSET_SUB(page_info, u.inuse, _domain); +#else + VMCOREINFO_OFFSET_SUB(page_info, v.inuse, _domain); +#endif VMCOREINFO_OFFSET(domain, domain_id); VMCOREINFO_OFFSET(domain, next_in_list); diff -r 39194f457534 -r e2027af5f4b5 xen/include/xen/kexec.h --- a/xen/include/xen/kexec.h Wed Jan 05 09:57:15 2011 +0000 +++ b/xen/include/xen/kexec.h Wed Jan 05 15:43:46 2011 +0100 @@ -52,9 +52,9 @@ void vmcoreinfo_append_str(const char *f #define VMCOREINFO_OFFSET(name, field) \ vmcoreinfo_append_str("OFFSET(%s.%s)=%lu\n", #name, #field, \ (unsigned long)offsetof(struct name, field)) -#define VMCOREINFO_OFFSET_ALIAS(name, field, alias) \ - vmcoreinfo_append_str("OFFSET(%s.%s)=%lu\n", #name, #alias, \ - (unsigned long)offsetof(struct name, field)) +#define VMCOREINFO_OFFSET_SUB(name, sub, field) \ + vmcoreinfo_append_str("OFFSET(%s.%s)=%lu\n", #name, #field, \ + (unsigned long)offsetof(struct name, sub.field)) #endif /* __XEN_KEXEC_H__ */