forked from magneticfieldcurrency/crash
-
Notifications
You must be signed in to change notification settings - Fork 0
/
xen_dom0.h
77 lines (66 loc) · 2.11 KB
/
xen_dom0.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
/* xen_dom0.h
*
* Copyright (C) 2015 David Anderson
* Copyright (C) 2015 Red Hat, Inc. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* Author: David Anderson
*/
/*
* ELF note types for Xen dom0/hypervisor kdumps.
* The comments below are from xen/include/public/elfnote.h.
*/
/*
* System information exported through crash notes.
*
* The kexec / kdump code will create one XEN_ELFNOTE_CRASH_INFO
* note in case of a system crash. This note will contain various
* information about the system, see xen/include/xen/elfcore.h.
*/
#define XEN_ELFNOTE_CRASH_INFO 0x1000001
/*
* System registers exported through crash notes.
*
* The kexec / kdump code will create one XEN_ELFNOTE_CRASH_REGS
* note per cpu in case of a system crash. This note is architecture
* specific and will contain registers not saved in the "CORE" note.
* See xen/include/xen/elfcore.h for more information.
*/
#define XEN_ELFNOTE_CRASH_REGS 0x1000002
/*
* For (temporary) backwards compatibility.
*/
#define NT_XEN_KDUMP_CR3 0x10000001
struct xen_kdump_data {
ulong flags;
ulong cr3;
ulong p2m_mfn;
char *page;
ulong last_mfn_read;
ulong last_pmd_read;
ulong cache_hits;
ulong accesses;
int p2m_frames;
ulong *p2m_mfn_frame_list;
ulong xen_phys_start;
int xen_major_version;
int xen_minor_version;
};
#define KDUMP_P2M_INIT (0x1)
#define KDUMP_CR3 (0x2)
#define KDUMP_MFN_LIST (0x4)
#define P2M_FAILURE ((physaddr_t)(0xffffffffffffffffLL))
extern struct xen_kdump_data *xkd;
void dump_xen_kdump_data(FILE *);
struct xen_kdump_data *get_xen_kdump_data(void);
void process_xen_note(ulong, void *, size_t);
physaddr_t xen_kdump_p2m(physaddr_t);