correct _domain offset info in elf-notes
PATCH 1/1 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.
2 files changed, 8 insertions(+), 4 deletions(-) xen/common/kexec.c | 6 +++++- xen/include/xen/kexec.h | 6 +++---
# HG changeset patch
# User Juergen Gross <[email protected]> # 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.
xen/common/kexec.c +5 -1
@@ -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);
xen/include/xen/kexec.h +3 -3
@@ -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__ */
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel