version.h 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. /* SPDX-License-Identifier: GPL-2.0 */
  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. #ifndef __XEN_PUBLIC_VERSION_H__
  11. #define __XEN_PUBLIC_VERSION_H__
  12. /* NB. All ops return zero on success, except XENVER_version. */
  13. /* arg == NULL; returns major:minor (16:16). */
  14. #define XENVER_version 0
  15. /* arg == xen_extraversion_t. */
  16. #define XENVER_extraversion 1
  17. struct xen_extraversion {
  18. char extraversion[16];
  19. };
  20. #define XEN_EXTRAVERSION_LEN (sizeof(struct xen_extraversion))
  21. /* arg == xen_compile_info_t. */
  22. #define XENVER_compile_info 2
  23. struct xen_compile_info {
  24. char compiler[64];
  25. char compile_by[16];
  26. char compile_domain[32];
  27. char compile_date[32];
  28. };
  29. #define XENVER_capabilities 3
  30. struct xen_capabilities_info {
  31. char info[1024];
  32. };
  33. #define XEN_CAPABILITIES_INFO_LEN (sizeof(struct xen_capabilities_info))
  34. #define XENVER_changeset 4
  35. struct xen_changeset_info {
  36. char info[64];
  37. };
  38. #define XEN_CHANGESET_INFO_LEN (sizeof(struct xen_changeset_info))
  39. #define XENVER_platform_parameters 5
  40. struct xen_platform_parameters {
  41. xen_ulong_t virt_start;
  42. };
  43. #define XENVER_get_features 6
  44. struct xen_feature_info {
  45. unsigned int submap_idx; /* IN: which 32-bit submap to return */
  46. uint32_t submap; /* OUT: 32-bit submap */
  47. };
  48. /* Declares the features reported by XENVER_get_features. */
  49. #include <xen/interface/features.h>
  50. /* arg == NULL; returns host memory page size. */
  51. #define XENVER_pagesize 7
  52. /* arg == xen_domain_handle_t. */
  53. #define XENVER_guest_handle 8
  54. #define XENVER_commandline 9
  55. struct xen_commandline {
  56. char buf[1024];
  57. };
  58. /*
  59. * Return value is the number of bytes written, or XEN_Exx on error.
  60. * Calling with empty parameter returns the size of build_id.
  61. */
  62. #define XENVER_build_id 10
  63. struct xen_build_id {
  64. uint32_t len; /* IN: size of buf[]. */
  65. unsigned char buf[];
  66. };
  67. #endif /* __XEN_PUBLIC_VERSION_H__ */