mvp_version.h 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120
  1. /*
  2. * Linux 2.6.32 and later Kernel module for VMware MVP Hypervisor Support
  3. *
  4. * Copyright (C) 2010-2013 VMware, Inc. All rights reserved.
  5. *
  6. * This program is free software; you can redistribute it and/or modify it
  7. * under the terms of the GNU General Public License version 2 as published by
  8. * the Free Software Foundation.
  9. *
  10. * This program is distributed in the hope that it will be useful, but WITHOUT
  11. * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  12. * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
  13. * more details.
  14. *
  15. * You should have received a copy of the GNU General Public License along with
  16. * this program; see the file COPYING. If not, write to the Free Software
  17. * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  18. */
  19. #line 5
  20. /**
  21. * @file
  22. *
  23. * @brief What version is this?
  24. *
  25. */
  26. #ifndef _MVP_VERSION_H_
  27. #define _MVP_VERSION_H_
  28. #define INCLUDE_ALLOW_MVPD
  29. #define INCLUDE_ALLOW_VMX
  30. #define INCLUDE_ALLOW_MODULE
  31. #define INCLUDE_ALLOW_MONITOR
  32. #define INCLUDE_ALLOW_GPL
  33. #define INCLUDE_ALLOW_HOSTUSER
  34. #include "include_check.h"
  35. #include "utils.h"
  36. /*
  37. * MVP Internal Version Numbering
  38. *
  39. *
  40. * There are 4 different usage areas of version information.
  41. *
  42. * Version Name. This is a marketing string that is used to sell the
  43. * product. The update of this string has legal consequences, it
  44. * should be done infrequently. Currently we use "V1.0" like
  45. * terms. Developer builds have E.X.P as Version Name.
  46. *
  47. * Android Version Code. This is an integer associated with
  48. * com.vmware.mvp.apk on Google Play (a.k.a Android Market). If our
  49. * product is multi-apk (that is, we release individual apks for the
  50. * different Android versions) then the Android Version Code must
  51. * satisfy certain constrains. Typically the Android API level is
  52. * the high order 2 digits.
  53. *
  54. * Engineering Version Code. During an update process of one of the
  55. * 3 components on the handset (MVP, VVP, OEK) compatibility needs
  56. * to be verified. The Engineering Version Code is a single number
  57. * associated with each of the 4 components and it serves as a basis
  58. * of this compatibility test. It reflects time, bigger number is
  59. * associated with newer code.
  60. *
  61. * Git Revision. The git hash is a unique identifier of the
  62. * source. If picked up from a log, engineers can go to the code
  63. * depos and check out the exact code used for the build. For MVP,
  64. * VVP, and OEK this is the main/mvp.git, for HMM it is
  65. * main/mdm.git. Note that git hash is not ordered, it cannot be
  66. * used to directly determine precedence.
  67. *
  68. */
  69. #define MVP_VERSION_CODE 16800041
  70. #define MVP_VERSION_CODE_FORMATSTR "%s_%d"
  71. #define MVP_VERSION_CODE_FORMATARGSV(V_) MVP_STRINGIFY(1.6.0), (V_)
  72. #define MVP_VERSION_CODE_FORMATARGS \
  73. MVP_VERSION_CODE_FORMATARGSV(MVP_VERSION_CODE)
  74. #define MVP_VERSION_FORMATSTR \
  75. MVP_VERSION_CODE_FORMATSTR \
  76. " compiled at %s based on revision %s by user %s."
  77. #define MVP_VERSION_FORMATARGS \
  78. MVP_VERSION_CODE_FORMATARGS, \
  79. __DATE__, \
  80. MVP_STRINGIFY(b929bac713959c76f8eb1f485c86be6156df4614), \
  81. MVP_STRINGIFY()
  82. #define MvpVersion_Map(map_, version_) ({ \
  83. uint32 ii_; \
  84. uint32 versionApi_ = 0; \
  85. \
  86. for (ii_ = 0; ii_ < NELEM(map_); ii_++) { \
  87. if (map_[ii_] <= version_) \
  88. versionApi_ = map_[ii_]; \
  89. } \
  90. versionApi_; \
  91. })
  92. /*
  93. * MVP.apk must communicate to VVP and OEK on many of its APIs. To
  94. * ensure compatibility, it is mandated that any VVP and OEK version
  95. * younger than the minimums defined below can be serviced on all of
  96. * the various APIs.
  97. *
  98. * During the deprecation process, first a marketing decision is made
  99. * that the limit below can be raised. After the new minimums are
  100. * determined, they must be entered here. Then the various APIs can
  101. * remove code that has been obsoleted before the new minimum versions.
  102. */
  103. #define VVP_VERSION_CODE_MIN 16800015
  104. #define OEK_VERSION_CODE_MIN 0x01000001
  105. #define BALLOON_WATCHDOG 16800010
  106. #define GUEST_SAME_MINFREE 16800033
  107. #define BALLOON_WATCHDOG_RO 16800039
  108. #endif /* _MVP_VERSION_H_ */