WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [xen-unstable] kexec: correct _domain offset info in elf

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] kexec: correct _domain offset info in elf-notes
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Mon, 17 Jan 2011 07:58:47 -0800
Delivery-date: Mon, 17 Jan 2011 08:05:10 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# 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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] kexec: correct _domain offset info in elf-notes, Xen patchbot-unstable <=