# HG changeset patch
# User Keir Fraser <keir@xxxxxxx>
# Date 1294340556 0
# Node ID cb756381087c7c2f88caf2f35c3d9d44fd061c10
# Parent e18d9af29d2a31cffedb87bed759ec3202043c5d
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@xxxxxxxxxxxxxx>
---
xen/common/kexec.c | 6 +++++-
xen/include/xen/kexec.h | 6 +++---
2 files changed, 8 insertions(+), 4 deletions(-)
diff -r e18d9af29d2a -r cb756381087c xen/common/kexec.c
--- a/xen/common/kexec.c Thu Jan 06 18:04:48 2011 +0000
+++ b/xen/common/kexec.c Thu Jan 06 19:02:36 2011 +0000
@@ -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 e18d9af29d2a -r cb756381087c xen/include/xen/kexec.h
--- a/xen/include/xen/kexec.h Thu Jan 06 18:04:48 2011 +0000
+++ b/xen/include/xen/kexec.h Thu Jan 06 19:02:36 2011 +0000
@@ -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-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog
|