From: Juergen Gross Subject: [PATCH] correct _domain offset info in elf-notes Date: Wed, 05 Jan 2011 15:44:42 +0100 Message-ID: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============6842848416518968561==" Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org --===============6842848416518968561== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit 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@ts.fujitsu.com 2 files changed, 8 insertions(+), 4 deletions(-) xen/common/kexec.c | 6 +++++- xen/include/xen/kexec.h | 6 +++--- --===============6842848416518968561== Content-Type: text/x-patch; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=xen-staging.hg.patch # 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@ts.fujitsu.com 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__ */ --===============6842848416518968561== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --===============6842848416518968561==--