ia64/xen-unstable

view docs/misc/dump-core-format.txt @ 15783:c93e2a822d6f

[xen, xencomm] xencomm multiple page support
Current implementation doesn't allow struct xencomm_desc::address
array to be more than single page. On IA64 it causes 64GB+ domain
creation failure. This patch generalizes xencomm to allow multipage

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
author kfraser@localhost.localdomain
date Tue Aug 28 15:32:27 2007 +0100 (2007-08-28)
parents ca7cd6752cc2
children 23bf79231e12
line source
1 xen dump-core format
2 Written by Isaku Yamahata <yamahata at valinux co jp> Feb. 2007
5 Introduction
6 ------------
7 With xm dump-core command, the guest domain's core can be created as a file.
8 Its format was changed to be based on ELF format because elf format is easily
9 extensible and handy. This document describes the new format.
10 In this document the new format is called new xen dump-core format,
11 xen dump-core format or simply dump-core format. The file of xen dump-core
12 format is called xen dump-core file or dump-core file.
14 The usual process core file includes program headers and no section header.
15 On the other hand the xen dump-core file includes no program headers and
16 some sections because of its peculiar requirements.
19 Reference
20 ---------
21 For ELF format itself, see Tool Interface Standard(TIS) Executable and
22 Linking Format(ELF) Specification version 1.2.
23 For xen related structure, please see the xen header files.
26 Elf header
27 ----------
28 The elf header members are set as follows
29 e_ident[EI_CLASS] = ELFCLASS64 = 2
30 e_ident[EI_OSABI] = ELFOSABI_SYSV = 0
31 e_type = ET_CORE = 4
32 ELFCLASS64 is always used independent of architecture.
33 e_ident[EI_DATA] and e_flags are set according to the dumping system's
34 architecture. Other members are set as usual.
36 Sections
37 --------
38 Currently the following sections are defined. Some sections are optional.
40 ".note.Xen" section
41 name ".note.Xen"
42 type SHT_NOTE
43 description
44 This section is used as note section to store xen dump-core
45 file specific informations. The each detailed informations are
46 described in note section. This section must exist.
48 ".xen_prstatus" section
49 name ".xen_prstatus"
50 type SHT_PROGBITS
51 structure array of vcpu_guest_context_t
52 description
53 This section stores the array of vcpu_guest_context_t
54 which is obtained by XEN_DOMCTL_getvcpucontext hypercall
55 when the xen dump-core file is created.
56 The size of array is stored in xch_nr_vcpus member of header
57 note descriptor in .note.Xen note section.
58 This section must exist.
60 ".xen_shared_info" section
61 name ".xen_shared_info"
62 type SHT_PROGBITS
63 structure shared_info_t
64 description
65 This section stores the contents of shared info page
66 of a domain. This section is optional.
68 ".xen_p2m" section
69 name ".xen_p2m"
70 type SHT_PROGBITS
71 structure array of struct xen_dumpcore_p2m
72 struct xen_dumpcore_p2m {
73 uint64_t pfn;
74 uint64_t gmfn;
75 };
76 description
77 This elements represents the frame number of the page
78 in .xen_pages section.
79 pfn: guest-specific pseudo-physical frame number
80 gmfn: machine physical frame number
81 The size of arrays is stored in xch_nr_pages member of header
82 note descriptor in .note.Xen note section.
83 The entryies are stored in pfn-ascending order.
84 This section must exist when the domain is non auto
85 translated physmap mode. Currently x86 paravirtualized domain.
87 ".xen_pfn" section
88 name ".xen_pfn"
89 type SHT_PROGBITS
90 structure array of uint64_t
91 description
92 This elements represents the frame number of the page
93 in .xen_pages section.
94 The size of arrays is stored in xch_nr_pages member of header
95 note descriptor in .note.Xen note section.
96 The entries are stored in ascending order.
97 This section must exist when the domain is auto translated
98 physmap mode. Currently x86 full virtualized domain and
99 ia64 domain.
101 ".xen_pages" section
102 name ".xen_pages"
103 type SHT_PROGBITS
104 structure array of page where page is page size byte array
105 description
106 This section includes the contents of pages.
107 The corresponding address is described in .xen_p2m section
108 or .xen_pfn section.
109 The page size is stored in xch_page_size member of header note
110 descriptor in .note.Xen section.
111 The array size is stored in xch_nr_pages member of header note
112 descriptor in .note.Xen section.
113 This section must exist.
116 ".xen_ia64_mapped_regs" section
117 name ".xen_ia64_mapped_regs"
118 type SHT_PROGBITS
119 structure array of mapped_regs_t
120 description
121 This section stores the array of mapped_regs_t.
122 The size of array is stored in xch_nr_vcpus member of header
123 note descriptor in .note.Xen note section.
124 This section is ia64 specific and must exist for ia64 domain.
125 This section must not exist for non-ia64 domain.
128 note section
129 ------------
130 The note types are defined in xen/include/public/elfnote.h.
131 The note descriptors are defined in tools/libxc/xc_core.h
132 Currently the following note informations are defined.
135 elf note section
137 "Xen" is used as elf note name in elf note info
138 namesz 4
139 name "Xen" (null-terminated)
142 Descriptors
144 none note descriptor
145 type XEN_ELFNOTE_DUMPCORE_NONE = 0x2000000
146 structure struct xen_dumpcore_elfnote_none_desc {
147 /* nothing is defined */
148 };
149 description
150 This note descriptor is defined to just indicate that this
151 file is xen dump-core format without any specific information.
152 This note information must exist.
154 header note descriptor
155 type XEN_ELFNOTE_DUMPCORE_HEADER = 0x2000001
156 structure struct xen_dumpcore_elfnote_header_desc {
157 uint64_t xch_magic;
158 uint64_t xch_nr_vcpus;
159 uint64_t xch_nr_pages;
160 uint64_t xch_page_size;
161 };
162 description
163 This note descriptor stores basic information of the domain.
164 xch_magic magic number
165 XC_CORE_MAGIC = 0xF00FEBED for paravirtualized domain
166 XC_CORE_MAGIC_HVM = 0xF00FEBEE for full virtualized domain
167 xch_nr_vcpus the number of vcpus
168 xch_nr_pages the number of pages
169 xch_page_size guest OS's page size
170 This note information must exist.
172 xen_version descriptor
173 type XEN_ELFNOTE_DUMPCORE_XEN_VERSION = 0x2000002
174 structure struct xen_dumpcore_elfnote_xen_version_desc {
175 uint64_t major_version;
176 uint64_t minor_version;
177 xen_extraversion_t extra_version;
178 xen_compile_info_t compile_info;
179 xen_capabilities_info_t capabilities;
180 xen_changeset_info_t changeset;
181 xen_platform_parameters_t platform_parameters;
182 uint64_t pagesize;
183 };
184 description
185 This note descriptor stores basic information about xen
186 hypervisor. The each members store the result of
187 __HYPERVISOR_xen_version hypercall.
188 major_version 16msb bit of the result of XENVER_version
189 minor_version 16lsb bit of the result of XENVER_version
190 uint64_t is used to make struct
191 xen_dumpcore_elfnote_xen_version_desc independent
192 on 32bit/64bit instead of uint32_t.
193 extra_version the result of XENVER_extraversion
194 compile_info the result of XENVER_compile_info
195 capabilities the result of XENVER_capabilities
196 changeset the result of XENVER_changeset
197 platform_parameters
198 the result of XENVER_platform_parameters
199 pagesize the result of XENVER_pagesize
200 This note information must exist.
202 format_version descriptor
203 type XEN_ELFNOTE_DUMPCORE_FORMAT_VERSION = 0x2000003
204 structure struct xen_dumpcore_elfnote_format_version_desc {
205 uint64_t version;
206 };
207 description
208 This note descriptor stores xen dump-core format version.
209 The 32msb bit is major version and the 32lsb bit is minor
210 version.
211 The minor version will be incremented when the format
212 is changed in compatible way. e.g. new sections, new note
213 descriptors are added.
214 the major version will be incremented when the format is
215 changed in incompatible way.
216 This note information must exit. Analysis tools should check
217 this format version.
218 This note information must exist.
221 Format version history
222 ----------------------
223 Currently only (major, minor) = (0, 1) is used.
224 [When the format is changed, it would be described here.]
226 (0, 1) update
227 - .xen_p2m, .xen_pfn section
228 Arrays must be in pfn ascending order for efficient looking up.
229 - EI_CLASS member of elf header was changed to ELFCLASS64 independent of
230 architecture. This is mainly for x86_32pae.
231 The format version isn't bumped because analysis tools can distinguish it.