1*3a9fd824SRoger Pau Monné /****************************************************************************** 2*3a9fd824SRoger Pau Monné * features.h 3*3a9fd824SRoger Pau Monné * 4*3a9fd824SRoger Pau Monné * Feature flags, reported by XENVER_get_features. 5*3a9fd824SRoger Pau Monné * 6*3a9fd824SRoger Pau Monné * Permission is hereby granted, free of charge, to any person obtaining a copy 7*3a9fd824SRoger Pau Monné * of this software and associated documentation files (the "Software"), to 8*3a9fd824SRoger Pau Monné * deal in the Software without restriction, including without limitation the 9*3a9fd824SRoger Pau Monné * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or 10*3a9fd824SRoger Pau Monné * sell copies of the Software, and to permit persons to whom the Software is 11*3a9fd824SRoger Pau Monné * furnished to do so, subject to the following conditions: 12*3a9fd824SRoger Pau Monné * 13*3a9fd824SRoger Pau Monné * The above copyright notice and this permission notice shall be included in 14*3a9fd824SRoger Pau Monné * all copies or substantial portions of the Software. 15*3a9fd824SRoger Pau Monné * 16*3a9fd824SRoger Pau Monné * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17*3a9fd824SRoger Pau Monné * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18*3a9fd824SRoger Pau Monné * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19*3a9fd824SRoger Pau Monné * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20*3a9fd824SRoger Pau Monné * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 21*3a9fd824SRoger Pau Monné * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 22*3a9fd824SRoger Pau Monné * DEALINGS IN THE SOFTWARE. 23*3a9fd824SRoger Pau Monné * 24*3a9fd824SRoger Pau Monné * Copyright (c) 2006, Keir Fraser <keir@xensource.com> 25*3a9fd824SRoger Pau Monné */ 26*3a9fd824SRoger Pau Monné 27*3a9fd824SRoger Pau Monné #ifndef __XEN_PUBLIC_FEATURES_H__ 28*3a9fd824SRoger Pau Monné #define __XEN_PUBLIC_FEATURES_H__ 29*3a9fd824SRoger Pau Monné 30*3a9fd824SRoger Pau Monné /* 31*3a9fd824SRoger Pau Monné * `incontents 200 elfnotes_features XEN_ELFNOTE_FEATURES 32*3a9fd824SRoger Pau Monné * 33*3a9fd824SRoger Pau Monné * The list of all the features the guest supports. They are set by 34*3a9fd824SRoger Pau Monné * parsing the XEN_ELFNOTE_FEATURES and XEN_ELFNOTE_SUPPORTED_FEATURES 35*3a9fd824SRoger Pau Monné * string. The format is the feature names (as given here without the 36*3a9fd824SRoger Pau Monné * "XENFEAT_" prefix) separated by '|' characters. 37*3a9fd824SRoger Pau Monné * If a feature is required for the kernel to function then the feature name 38*3a9fd824SRoger Pau Monné * must be preceded by a '!' character. 39*3a9fd824SRoger Pau Monné * 40*3a9fd824SRoger Pau Monné * Note that if XEN_ELFNOTE_SUPPORTED_FEATURES is used, then in the 41*3a9fd824SRoger Pau Monné * XENFEAT_dom0 MUST be set if the guest is to be booted as dom0, 42*3a9fd824SRoger Pau Monné */ 43*3a9fd824SRoger Pau Monné 44*3a9fd824SRoger Pau Monné /* 45*3a9fd824SRoger Pau Monné * If set, the guest does not need to write-protect its pagetables, and can 46*3a9fd824SRoger Pau Monné * update them via direct writes. 47*3a9fd824SRoger Pau Monné */ 48*3a9fd824SRoger Pau Monné #define XENFEAT_writable_page_tables 0 49*3a9fd824SRoger Pau Monné 50*3a9fd824SRoger Pau Monné /* 51*3a9fd824SRoger Pau Monné * If set, the guest does not need to write-protect its segment descriptor 52*3a9fd824SRoger Pau Monné * tables, and can update them via direct writes. 53*3a9fd824SRoger Pau Monné */ 54*3a9fd824SRoger Pau Monné #define XENFEAT_writable_descriptor_tables 1 55*3a9fd824SRoger Pau Monné 56*3a9fd824SRoger Pau Monné /* 57*3a9fd824SRoger Pau Monné * If set, translation between the guest's 'pseudo-physical' address space 58*3a9fd824SRoger Pau Monné * and the host's machine address space are handled by the hypervisor. In this 59*3a9fd824SRoger Pau Monné * mode the guest does not need to perform phys-to/from-machine translations 60*3a9fd824SRoger Pau Monné * when performing page table operations. 61*3a9fd824SRoger Pau Monné */ 62*3a9fd824SRoger Pau Monné #define XENFEAT_auto_translated_physmap 2 63*3a9fd824SRoger Pau Monné 64*3a9fd824SRoger Pau Monné /* If set, the guest is running in supervisor mode (e.g., x86 ring 0). */ 65*3a9fd824SRoger Pau Monné #define XENFEAT_supervisor_mode_kernel 3 66*3a9fd824SRoger Pau Monné 67*3a9fd824SRoger Pau Monné /* 68*3a9fd824SRoger Pau Monné * If set, the guest does not need to allocate x86 PAE page directories 69*3a9fd824SRoger Pau Monné * below 4GB. This flag is usually implied by auto_translated_physmap. 70*3a9fd824SRoger Pau Monné */ 71*3a9fd824SRoger Pau Monné #define XENFEAT_pae_pgdir_above_4gb 4 72*3a9fd824SRoger Pau Monné 73*3a9fd824SRoger Pau Monné /* x86: Does this Xen host support the MMU_PT_UPDATE_PRESERVE_AD hypercall? */ 74*3a9fd824SRoger Pau Monné #define XENFEAT_mmu_pt_update_preserve_ad 5 75*3a9fd824SRoger Pau Monné 76*3a9fd824SRoger Pau Monné /* x86: Does this Xen host support the MMU_{CLEAR,COPY}_PAGE hypercall? */ 77*3a9fd824SRoger Pau Monné #define XENFEAT_highmem_assist 6 78*3a9fd824SRoger Pau Monné 79*3a9fd824SRoger Pau Monné /* 80*3a9fd824SRoger Pau Monné * If set, GNTTABOP_map_grant_ref honors flags to be placed into guest kernel 81*3a9fd824SRoger Pau Monné * available pte bits. 82*3a9fd824SRoger Pau Monné */ 83*3a9fd824SRoger Pau Monné #define XENFEAT_gnttab_map_avail_bits 7 84*3a9fd824SRoger Pau Monné 85*3a9fd824SRoger Pau Monné /* x86: Does this Xen host support the HVM callback vector type? */ 86*3a9fd824SRoger Pau Monné #define XENFEAT_hvm_callback_vector 8 87*3a9fd824SRoger Pau Monné 88*3a9fd824SRoger Pau Monné /* x86: pvclock algorithm is safe to use on HVM */ 89*3a9fd824SRoger Pau Monné #define XENFEAT_hvm_safe_pvclock 9 90*3a9fd824SRoger Pau Monné 91*3a9fd824SRoger Pau Monné /* x86: pirq can be used by HVM guests */ 92*3a9fd824SRoger Pau Monné #define XENFEAT_hvm_pirqs 10 93*3a9fd824SRoger Pau Monné 94*3a9fd824SRoger Pau Monné /* operation as Dom0 is supported */ 95*3a9fd824SRoger Pau Monné #define XENFEAT_dom0 11 96*3a9fd824SRoger Pau Monné 97*3a9fd824SRoger Pau Monné /* Xen also maps grant references at pfn = mfn. 98*3a9fd824SRoger Pau Monné * This feature flag is deprecated and should not be used. 99*3a9fd824SRoger Pau Monné #define XENFEAT_grant_map_identity 12 100*3a9fd824SRoger Pau Monné */ 101*3a9fd824SRoger Pau Monné 102*3a9fd824SRoger Pau Monné /* Guest can use XENMEMF_vnode to specify virtual node for memory op. */ 103*3a9fd824SRoger Pau Monné #define XENFEAT_memory_op_vnode_supported 13 104*3a9fd824SRoger Pau Monné 105*3a9fd824SRoger Pau Monné /* arm: Hypervisor supports ARM SMC calling convention. */ 106*3a9fd824SRoger Pau Monné #define XENFEAT_ARM_SMCCC_supported 14 107*3a9fd824SRoger Pau Monné 108*3a9fd824SRoger Pau Monné /* 109*3a9fd824SRoger Pau Monné * x86/PVH: If set, ACPI RSDP can be placed at any address. Otherwise RSDP 110*3a9fd824SRoger Pau Monné * must be located in lower 1MB, as required by ACPI Specification for IA-PC 111*3a9fd824SRoger Pau Monné * systems. 112*3a9fd824SRoger Pau Monné * This feature flag is only consulted if XEN_ELFNOTE_GUEST_OS contains 113*3a9fd824SRoger Pau Monné * the "linux" string. 114*3a9fd824SRoger Pau Monné */ 115*3a9fd824SRoger Pau Monné #define XENFEAT_linux_rsdp_unrestricted 15 116*3a9fd824SRoger Pau Monné 117*3a9fd824SRoger Pau Monné /* 118*3a9fd824SRoger Pau Monné * A direct-mapped (or 1:1 mapped) domain is a domain for which its 119*3a9fd824SRoger Pau Monné * local pages have gfn == mfn. If a domain is direct-mapped, 120*3a9fd824SRoger Pau Monné * XENFEAT_direct_mapped is set; otherwise XENFEAT_not_direct_mapped 121*3a9fd824SRoger Pau Monné * is set. 122*3a9fd824SRoger Pau Monné * 123*3a9fd824SRoger Pau Monné * If neither flag is set (e.g. older Xen releases) the assumptions are: 124*3a9fd824SRoger Pau Monné * - not auto_translated domains (x86 only) are always direct-mapped 125*3a9fd824SRoger Pau Monné * - on x86, auto_translated domains are not direct-mapped 126*3a9fd824SRoger Pau Monné * - on ARM, Dom0 is direct-mapped, DomUs are not 127*3a9fd824SRoger Pau Monné */ 128*3a9fd824SRoger Pau Monné #define XENFEAT_not_direct_mapped 16 129*3a9fd824SRoger Pau Monné #define XENFEAT_direct_mapped 17 130*3a9fd824SRoger Pau Monné 131*3a9fd824SRoger Pau Monné #define XENFEAT_NR_SUBMAPS 1 132*3a9fd824SRoger Pau Monné 133*3a9fd824SRoger Pau Monné #endif /* __XEN_PUBLIC_FEATURES_H__ */ 134*3a9fd824SRoger Pau Monné 135*3a9fd824SRoger Pau Monné /* 136*3a9fd824SRoger Pau Monné * Local variables: 137*3a9fd824SRoger Pau Monné * mode: C 138*3a9fd824SRoger Pau Monné * c-file-style: "BSD" 139*3a9fd824SRoger Pau Monné * c-basic-offset: 4 140*3a9fd824SRoger Pau Monné * tab-width: 4 141*3a9fd824SRoger Pau Monné * indent-tabs-mode: nil 142*3a9fd824SRoger Pau Monné * End: 143*3a9fd824SRoger Pau Monné */ 144