# HG changeset patch
# User Keir Fraser <keir@xxxxxxx>
# Date 1294340706 0
# Node ID 3b90a5353f20fe3e6e270480e395b39e05d42fd3
# Parent 8c451cdc2dca17c14979d8b52f01472b0a8e84fa
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-unstable changeset: 22666:cb756381087c
xen-unstable date: Thu Jan 06 19:02:36 2011 +0000
---
xen/common/kexec.c | 6 +++++-
xen/include/xen/kexec.h | 6 +++---
2 files changed, 8 insertions(+), 4 deletions(-)
diff -r 8c451cdc2dca -r 3b90a5353f20 xen/common/kexec.c
--- a/xen/common/kexec.c Thu Jan 06 18:57:28 2011 +0000
+++ b/xen/common/kexec.c Thu Jan 06 19:05:06 2011 +0000
@@ -371,7 +371,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 8c451cdc2dca -r 3b90a5353f20 xen/include/xen/kexec.h
--- a/xen/include/xen/kexec.h Thu Jan 06 18:57:28 2011 +0000
+++ b/xen/include/xen/kexec.h Thu Jan 06 19:05:06 2011 +0000
@@ -50,9 +50,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
|