xref: /qemu/include/hw/xen/interface/version.h (revision 8ac98aed)
1 /* SPDX-License-Identifier: MIT */
2 /******************************************************************************
3  * version.h
4  *
5  * Xen version, type, and compile information.
6  *
7  * Copyright (c) 2005, Nguyen Anh Quynh <aquynh@gmail.com>
8  * Copyright (c) 2005, Keir Fraser <keir@xensource.com>
9  */
10 
11 #ifndef __XEN_PUBLIC_VERSION_H__
12 #define __XEN_PUBLIC_VERSION_H__
13 
14 #include "xen.h"
15 
16 /* NB. All ops return zero on success, except XENVER_{version,pagesize}
17  * XENVER_{version,pagesize,build_id} */
18 
19 /* arg == NULL; returns major:minor (16:16). */
20 #define XENVER_version      0
21 
22 /* arg == xen_extraversion_t. */
23 #define XENVER_extraversion 1
24 typedef char xen_extraversion_t[16];
25 #define XEN_EXTRAVERSION_LEN (sizeof(xen_extraversion_t))
26 
27 /* arg == xen_compile_info_t. */
28 #define XENVER_compile_info 2
29 struct xen_compile_info {
30     char compiler[64];
31     char compile_by[16];
32     char compile_domain[32];
33     char compile_date[32];
34 };
35 typedef struct xen_compile_info xen_compile_info_t;
36 
37 #define XENVER_capabilities 3
38 typedef char xen_capabilities_info_t[1024];
39 #define XEN_CAPABILITIES_INFO_LEN (sizeof(xen_capabilities_info_t))
40 
41 #define XENVER_changeset 4
42 typedef char xen_changeset_info_t[64];
43 #define XEN_CHANGESET_INFO_LEN (sizeof(xen_changeset_info_t))
44 
45 #define XENVER_platform_parameters 5
46 struct xen_platform_parameters {
47     xen_ulong_t virt_start;
48 };
49 typedef struct xen_platform_parameters xen_platform_parameters_t;
50 
51 #define XENVER_get_features 6
52 struct xen_feature_info {
53     unsigned int submap_idx;    /* IN: which 32-bit submap to return */
54     uint32_t     submap;        /* OUT: 32-bit submap */
55 };
56 typedef struct xen_feature_info xen_feature_info_t;
57 
58 /* Declares the features reported by XENVER_get_features. */
59 #include "features.h"
60 
61 /* arg == NULL; returns host memory page size. */
62 #define XENVER_pagesize 7
63 
64 /* arg == xen_domain_handle_t.
65  *
66  * The toolstack fills it out for guest consumption. It is intended to hold
67  * the UUID of the guest.
68  */
69 #define XENVER_guest_handle 8
70 
71 #define XENVER_commandline 9
72 typedef char xen_commandline_t[1024];
73 
74 /*
75  * Return value is the number of bytes written, or XEN_Exx on error.
76  * Calling with empty parameter returns the size of build_id.
77  */
78 #define XENVER_build_id 10
79 struct xen_build_id {
80         uint32_t        len; /* IN: size of buf[]. */
81         unsigned char   buf[XEN_FLEX_ARRAY_DIM];
82                              /* OUT: Variable length buffer with build_id. */
83 };
84 typedef struct xen_build_id xen_build_id_t;
85 
86 #endif /* __XEN_PUBLIC_VERSION_H__ */
87 
88 /*
89  * Local variables:
90  * mode: C
91  * c-file-style: "BSD"
92  * c-basic-offset: 4
93  * tab-width: 4
94  * indent-tabs-mode: nil
95  * End:
96  */
97