ia64/xen-unstable

view xen/include/public/kexec.h @ 12835:58284e749407

Remove unused KEXEC_RANGE_VA_XEN.

KEXEC_RANGE_VA_XEN is currently unused and there is no point in exporting it.

Signed-Off-By: Magnus Damm <magnus@valinux.co.jp>
---

Applies to xen-unstable-12756

xen/common/kexec.c | 13 +++----------
xen/include/public/kexec.h | 3 +--
2 files changed, 4 insertions(+), 12 deletions(-)
author Ian Campbell <ian.campbell@xensource.com>
date Thu Dec 07 11:43:19 2006 +0000 (2006-12-07)
parents 2b43fb3afb3e
children 4108c2589fd1
line source
1 /******************************************************************************
2 * kexec.h - Public portion
3 *
4 * Xen port written by:
5 * - Simon 'Horms' Horman <horms@verge.net.au>
6 * - Magnus Damm <magnus@valinux.co.jp>
7 */
9 #ifndef _XEN_PUBLIC_KEXEC_H
10 #define _XEN_PUBLIC_KEXEC_H
13 /* This file describes the Kexec / Kdump hypercall interface for Xen.
14 *
15 * Kexec under vanilla Linux allows a user to reboot the physical machine
16 * into a new user-specified kernel. The Xen port extends this idea
17 * to allow rebooting of the machine from dom0. When kexec for dom0
18 * is used to reboot, both the hypervisor and the domains get replaced
19 * with some other kernel. It is possible to kexec between vanilla
20 * Linux and Xen and back again. Xen to Xen works well too.
21 *
22 * The hypercall interface for kexec can be divided into three main
23 * types of hypercall operations:
24 *
25 * 1) Range information:
26 * This is used by the dom0 kernel to ask the hypervisor about various
27 * address information. This information is needed to allow kexec-tools
28 * to fill in the ELF headers for /proc/vmcore properly.
29 *
30 * 2) Load and unload of images:
31 * There are no big surprises here, the kexec binary from kexec-tools
32 * runs in userspace in dom0. The tool loads/unloads data into the
33 * dom0 kernel such as new kernel, initramfs and hypervisor. When
34 * loaded the dom0 kernel performs a load hypercall operation, and
35 * before releasing all page references the dom0 kernel calls unload.
36 *
37 * 3) Kexec operation:
38 * This is used to start a previously loaded kernel.
39 */
41 #include "xen.h"
43 #if defined(__i386__) || defined(__x86_64__)
44 #define KEXEC_XEN_NO_PAGES 17
45 #endif
47 /*
48 * Prototype for this hypercall is:
49 * int kexec_op(int cmd, void *args)
50 * @cmd == KEXEC_CMD_...
51 * KEXEC operation to perform
52 * @args == Operation-specific extra arguments (NULL if none).
53 */
55 /*
56 * Kexec supports two types of operation:
57 * - kexec into a regular kernel, very similar to a standard reboot
58 * - KEXEC_TYPE_DEFAULT is used to specify this type
59 * - kexec into a special "crash kernel", aka kexec-on-panic
60 * - KEXEC_TYPE_CRASH is used to specify this type
61 * - parts of our system may be broken at kexec-on-panic time
62 * - the code should be kept as simple and self-contained as possible
63 */
65 #define KEXEC_TYPE_DEFAULT 0
66 #define KEXEC_TYPE_CRASH 1
69 /* The kexec implementation for Xen allows the user to load two
70 * types of kernels, KEXEC_TYPE_DEFAULT and KEXEC_TYPE_CRASH.
71 * All data needed for a kexec reboot is kept in one xen_kexec_image_t
72 * per "instance". The data mainly consists of machine address lists to pages
73 * together with destination addresses. The data in xen_kexec_image_t
74 * is passed to the "code page" which is one page of code that performs
75 * the final relocations before jumping to the new kernel.
76 */
78 typedef struct xen_kexec_image {
79 #if defined(__i386__) || defined(__x86_64__)
80 unsigned long page_list[KEXEC_XEN_NO_PAGES];
81 #endif
82 unsigned long indirection_page;
83 unsigned long start_address;
84 } xen_kexec_image_t;
86 /*
87 * Perform kexec having previously loaded a kexec or kdump kernel
88 * as appropriate.
89 * type == KEXEC_TYPE_DEFAULT or KEXEC_TYPE_CRASH [in]
90 */
91 #define KEXEC_CMD_kexec 0
92 typedef struct xen_kexec_exec {
93 int type;
94 } xen_kexec_exec_t;
96 /*
97 * Load/Unload kernel image for kexec or kdump.
98 * type == KEXEC_TYPE_DEFAULT or KEXEC_TYPE_CRASH [in]
99 * image == relocation information for kexec (ignored for unload) [in]
100 */
101 #define KEXEC_CMD_kexec_load 1
102 #define KEXEC_CMD_kexec_unload 2
103 typedef struct xen_kexec_load {
104 int type;
105 xen_kexec_image_t image;
106 } xen_kexec_load_t;
108 #define KEXEC_RANGE_MA_CRASH 0 /* machine address and size of crash area */
109 #define KEXEC_RANGE_MA_XEN 1 /* machine address and size of Xen itself */
110 #define KEXEC_RANGE_MA_CPU 2 /* machine address and size of a CPU note */
112 /*
113 * Find the address and size of certain memory areas
114 * range == KEXEC_RANGE_... [in]
115 * nr == physical CPU number (starting from 0) if KEXEC_RANGE_MA_CPU [in]
116 * size == number of bytes reserved in window [out]
117 * start == address of the first byte in the window [out]
118 */
119 #define KEXEC_CMD_kexec_get_range 3
120 typedef struct xen_kexec_range {
121 int range;
122 int nr;
123 unsigned long size;
124 unsigned long start;
125 } xen_kexec_range_t;
127 #endif /* _XEN_PUBLIC_KEXEC_H */
129 /*
130 * Local variables:
131 * mode: C
132 * c-set-style: "BSD"
133 * c-basic-offset: 4
134 * tab-width: 4
135 * indent-tabs-mode: nil
136 * End:
137 */