aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKeir Fraser <keir@xen.org>2011-01-06 19:05:06 +0000
committerKeir Fraser <keir@xen.org>2011-01-06 19:05:06 +0000
commitf3557ff6a2749ecbde3e5a39da2581a825390ada (patch)
tree900933a2a7e9ddf4dd25042a5ded554e2e09373b
parenta14434f02536fbaef18be7da3e376ea43664ade6 (diff)
downloadxen-f3557ff6a2749ecbde3e5a39da2581a825390ada.tar.gz
xen-f3557ff6a2749ecbde3e5a39da2581a825390ada.tar.bz2
xen-f3557ff6a2749ecbde3e5a39da2581a825390ada.zip
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> xen-unstable changeset: 22666:cb756381087c xen-unstable date: Thu Jan 06 19:02:36 2011 +0000
-rw-r--r--xen/common/kexec.c6
-rw-r--r--xen/include/xen/kexec.h6
2 files changed, 8 insertions, 4 deletions
diff --git a/xen/common/kexec.c b/xen/common/kexec.c
index 768bfd34d5..8b53d3aba8 100644
--- a/xen/common/kexec.c
+++ b/xen/common/kexec.c
@@ -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 --git a/xen/include/xen/kexec.h b/xen/include/xen/kexec.h
index d78510e639..6da282642f 100644
--- a/xen/include/xen/kexec.h
+++ b/xen/include/xen/kexec.h
@@ -50,9 +50,9 @@ void vmcoreinfo_append_str(const char *fmt, ...)
#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__ */