![]() |
|
|||
0001 /* SPDX-License-Identifier: MIT */ 0002 /****************************************************************************** 0003 * elfnote.h 0004 * 0005 * Definitions used for the Xen ELF notes. 0006 * 0007 * Copyright (c) 2006, Ian Campbell, XenSource Ltd. 0008 */ 0009 0010 #ifndef __XEN_PUBLIC_ELFNOTE_H__ 0011 #define __XEN_PUBLIC_ELFNOTE_H__ 0012 0013 /* 0014 * The notes should live in a SHT_NOTE segment and have "Xen" in the 0015 * name field. 0016 * 0017 * Numeric types are either 4 or 8 bytes depending on the content of 0018 * the desc field. 0019 * 0020 * LEGACY indicated the fields in the legacy __xen_guest string which 0021 * this a note type replaces. 0022 * 0023 * String values (for non-legacy) are NULL terminated ASCII, also known 0024 * as ASCIZ type. 0025 */ 0026 0027 /* 0028 * NAME=VALUE pair (string). 0029 */ 0030 #define XEN_ELFNOTE_INFO 0 0031 0032 /* 0033 * The virtual address of the entry point (numeric). 0034 * 0035 * LEGACY: VIRT_ENTRY 0036 */ 0037 #define XEN_ELFNOTE_ENTRY 1 0038 0039 /* The virtual address of the hypercall transfer page (numeric). 0040 * 0041 * LEGACY: HYPERCALL_PAGE. (n.b. legacy value is a physical page 0042 * number not a virtual address) 0043 */ 0044 #define XEN_ELFNOTE_HYPERCALL_PAGE 2 0045 0046 /* The virtual address where the kernel image should be mapped (numeric). 0047 * 0048 * Defaults to 0. 0049 * 0050 * LEGACY: VIRT_BASE 0051 */ 0052 #define XEN_ELFNOTE_VIRT_BASE 3 0053 0054 /* 0055 * The offset of the ELF paddr field from the acutal required 0056 * pseudo-physical address (numeric). 0057 * 0058 * This is used to maintain backwards compatibility with older kernels 0059 * which wrote __PAGE_OFFSET into that field. This field defaults to 0 0060 * if not present. 0061 * 0062 * LEGACY: ELF_PADDR_OFFSET. (n.b. legacy default is VIRT_BASE) 0063 */ 0064 #define XEN_ELFNOTE_PADDR_OFFSET 4 0065 0066 /* 0067 * The version of Xen that we work with (string). 0068 * 0069 * LEGACY: XEN_VER 0070 */ 0071 #define XEN_ELFNOTE_XEN_VERSION 5 0072 0073 /* 0074 * The name of the guest operating system (string). 0075 * 0076 * LEGACY: GUEST_OS 0077 */ 0078 #define XEN_ELFNOTE_GUEST_OS 6 0079 0080 /* 0081 * The version of the guest operating system (string). 0082 * 0083 * LEGACY: GUEST_VER 0084 */ 0085 #define XEN_ELFNOTE_GUEST_VERSION 7 0086 0087 /* 0088 * The loader type (string). 0089 * 0090 * LEGACY: LOADER 0091 */ 0092 #define XEN_ELFNOTE_LOADER 8 0093 0094 /* 0095 * The kernel supports PAE (x86/32 only, string = "yes" or "no"). 0096 * 0097 * LEGACY: PAE (n.b. The legacy interface included a provision to 0098 * indicate 'extended-cr3' support allowing L3 page tables to be 0099 * placed above 4G. It is assumed that any kernel new enough to use 0100 * these ELF notes will include this and therefore "yes" here is 0101 * equivalent to "yes[entended-cr3]" in the __xen_guest interface. 0102 */ 0103 #define XEN_ELFNOTE_PAE_MODE 9 0104 0105 /* 0106 * The features supported/required by this kernel (string). 0107 * 0108 * The string must consist of a list of feature names (as given in 0109 * features.h, without the "XENFEAT_" prefix) separated by '|' 0110 * characters. If a feature is required for the kernel to function 0111 * then the feature name must be preceded by a '!' character. 0112 * 0113 * LEGACY: FEATURES 0114 */ 0115 #define XEN_ELFNOTE_FEATURES 10 0116 0117 /* 0118 * The kernel requires the symbol table to be loaded (string = "yes" or "no") 0119 * LEGACY: BSD_SYMTAB (n.b. The legacy treated the presence or absence 0120 * of this string as a boolean flag rather than requiring "yes" or 0121 * "no". 0122 */ 0123 #define XEN_ELFNOTE_BSD_SYMTAB 11 0124 0125 /* 0126 * The lowest address the hypervisor hole can begin at (numeric). 0127 * 0128 * This must not be set higher than HYPERVISOR_VIRT_START. Its presence 0129 * also indicates to the hypervisor that the kernel can deal with the 0130 * hole starting at a higher address. 0131 */ 0132 #define XEN_ELFNOTE_HV_START_LOW 12 0133 0134 /* 0135 * List of maddr_t-sized mask/value pairs describing how to recognize 0136 * (non-present) L1 page table entries carrying valid MFNs (numeric). 0137 */ 0138 #define XEN_ELFNOTE_L1_MFN_VALID 13 0139 0140 /* 0141 * Whether or not the guest supports cooperative suspend cancellation. 0142 * This is a numeric value. 0143 * 0144 * Default is 0 0145 */ 0146 #define XEN_ELFNOTE_SUSPEND_CANCEL 14 0147 0148 /* 0149 * The (non-default) location the initial phys-to-machine map should be 0150 * placed at by the hypervisor (Dom0) or the tools (DomU). 0151 * The kernel must be prepared for this mapping to be established using 0152 * large pages, despite such otherwise not being available to guests. 0153 * The kernel must also be able to handle the page table pages used for 0154 * this mapping not being accessible through the initial mapping. 0155 * (Only x86-64 supports this at present.) 0156 */ 0157 #define XEN_ELFNOTE_INIT_P2M 15 0158 0159 /* 0160 * Whether or not the guest can deal with being passed an initrd not 0161 * mapped through its initial page tables. 0162 */ 0163 #define XEN_ELFNOTE_MOD_START_PFN 16 0164 0165 /* 0166 * The features supported by this kernel (numeric). 0167 * 0168 * Other than XEN_ELFNOTE_FEATURES on pre-4.2 Xen, this note allows a 0169 * kernel to specify support for features that older hypervisors don't 0170 * know about. The set of features 4.2 and newer hypervisors will 0171 * consider supported by the kernel is the combination of the sets 0172 * specified through this and the string note. 0173 * 0174 * LEGACY: FEATURES 0175 */ 0176 #define XEN_ELFNOTE_SUPPORTED_FEATURES 17 0177 0178 /* 0179 * Physical entry point into the kernel. 0180 * 0181 * 32bit entry point into the kernel. When requested to launch the 0182 * guest kernel in a HVM container, Xen will use this entry point to 0183 * launch the guest in 32bit protected mode with paging disabled. 0184 * Ignored otherwise. 0185 */ 0186 #define XEN_ELFNOTE_PHYS32_ENTRY 18 0187 0188 /* 0189 * The number of the highest elfnote defined. 0190 */ 0191 #define XEN_ELFNOTE_MAX XEN_ELFNOTE_PHYS32_ENTRY 0192 0193 #endif /* __XEN_PUBLIC_ELFNOTE_H__ */
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.1.0 LXR engine. The LXR team |
![]() ![]() |