1*843e1988Sjohnlev /****************************************************************************** 2*843e1988Sjohnlev * version.h 3*843e1988Sjohnlev * 4*843e1988Sjohnlev * Xen version, type, and compile information. 5*843e1988Sjohnlev * 6*843e1988Sjohnlev * Permission is hereby granted, free of charge, to any person obtaining a copy 7*843e1988Sjohnlev * of this software and associated documentation files (the "Software"), to 8*843e1988Sjohnlev * deal in the Software without restriction, including without limitation the 9*843e1988Sjohnlev * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or 10*843e1988Sjohnlev * sell copies of the Software, and to permit persons to whom the Software is 11*843e1988Sjohnlev * furnished to do so, subject to the following conditions: 12*843e1988Sjohnlev * 13*843e1988Sjohnlev * The above copyright notice and this permission notice shall be included in 14*843e1988Sjohnlev * all copies or substantial portions of the Software. 15*843e1988Sjohnlev * 16*843e1988Sjohnlev * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17*843e1988Sjohnlev * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18*843e1988Sjohnlev * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19*843e1988Sjohnlev * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20*843e1988Sjohnlev * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 21*843e1988Sjohnlev * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 22*843e1988Sjohnlev * DEALINGS IN THE SOFTWARE. 23*843e1988Sjohnlev * 24*843e1988Sjohnlev * Copyright (c) 2005, Nguyen Anh Quynh <aquynh@gmail.com> 25*843e1988Sjohnlev * Copyright (c) 2005, Keir Fraser <keir@xensource.com> 26*843e1988Sjohnlev */ 27*843e1988Sjohnlev 28*843e1988Sjohnlev #ifndef __XEN_PUBLIC_VERSION_H__ 29*843e1988Sjohnlev #define __XEN_PUBLIC_VERSION_H__ 30*843e1988Sjohnlev 31*843e1988Sjohnlev /* NB. All ops return zero on success, except XENVER_{version,pagesize} */ 32*843e1988Sjohnlev 33*843e1988Sjohnlev /* arg == NULL; returns major:minor (16:16). */ 34*843e1988Sjohnlev #define XENVER_version 0 35*843e1988Sjohnlev 36*843e1988Sjohnlev /* arg == xen_extraversion_t. */ 37*843e1988Sjohnlev #define XENVER_extraversion 1 38*843e1988Sjohnlev typedef char xen_extraversion_t[16]; 39*843e1988Sjohnlev #define XEN_EXTRAVERSION_LEN (sizeof(xen_extraversion_t)) 40*843e1988Sjohnlev 41*843e1988Sjohnlev /* arg == xen_compile_info_t. */ 42*843e1988Sjohnlev #define XENVER_compile_info 2 43*843e1988Sjohnlev struct xen_compile_info { 44*843e1988Sjohnlev char compiler[64]; 45*843e1988Sjohnlev char compile_by[16]; 46*843e1988Sjohnlev char compile_domain[32]; 47*843e1988Sjohnlev char compile_date[32]; 48*843e1988Sjohnlev }; 49*843e1988Sjohnlev typedef struct xen_compile_info xen_compile_info_t; 50*843e1988Sjohnlev 51*843e1988Sjohnlev #define XENVER_capabilities 3 52*843e1988Sjohnlev typedef char xen_capabilities_info_t[1024]; 53*843e1988Sjohnlev #define XEN_CAPABILITIES_INFO_LEN (sizeof(xen_capabilities_info_t)) 54*843e1988Sjohnlev 55*843e1988Sjohnlev #define XENVER_changeset 4 56*843e1988Sjohnlev typedef char xen_changeset_info_t[64]; 57*843e1988Sjohnlev #define XEN_CHANGESET_INFO_LEN (sizeof(xen_changeset_info_t)) 58*843e1988Sjohnlev 59*843e1988Sjohnlev #define XENVER_platform_parameters 5 60*843e1988Sjohnlev struct xen_platform_parameters { 61*843e1988Sjohnlev unsigned long virt_start; 62*843e1988Sjohnlev }; 63*843e1988Sjohnlev typedef struct xen_platform_parameters xen_platform_parameters_t; 64*843e1988Sjohnlev 65*843e1988Sjohnlev #define XENVER_get_features 6 66*843e1988Sjohnlev struct xen_feature_info { 67*843e1988Sjohnlev unsigned int submap_idx; /* IN: which 32-bit submap to return */ 68*843e1988Sjohnlev uint32_t submap; /* OUT: 32-bit submap */ 69*843e1988Sjohnlev }; 70*843e1988Sjohnlev typedef struct xen_feature_info xen_feature_info_t; 71*843e1988Sjohnlev 72*843e1988Sjohnlev /* Declares the features reported by XENVER_get_features. */ 73*843e1988Sjohnlev #include "features.h" 74*843e1988Sjohnlev 75*843e1988Sjohnlev /* arg == NULL; returns host memory page size. */ 76*843e1988Sjohnlev #define XENVER_pagesize 7 77*843e1988Sjohnlev 78*843e1988Sjohnlev /* arg == xen_domain_handle_t. */ 79*843e1988Sjohnlev #define XENVER_guest_handle 8 80*843e1988Sjohnlev 81*843e1988Sjohnlev #endif /* __XEN_PUBLIC_VERSION_H__ */ 82*843e1988Sjohnlev 83*843e1988Sjohnlev /* 84*843e1988Sjohnlev * Local variables: 85*843e1988Sjohnlev * mode: C 86*843e1988Sjohnlev * c-set-style: "BSD" 87*843e1988Sjohnlev * c-basic-offset: 4 88*843e1988Sjohnlev * tab-width: 4 89*843e1988Sjohnlev * indent-tabs-mode: nil 90*843e1988Sjohnlev * End: 91*843e1988Sjohnlev */ 92