aboutsummaryrefslogtreecommitdiffstats
path: root/include/xen/interface
diff options
context:
space:
mode:
Diffstat (limited to 'include/xen/interface')
-rw-r--r--include/xen/interface/version.h18
1 files changed, 0 insertions, 18 deletions
diff --git a/include/xen/interface/version.h b/include/xen/interface/version.h
index 53553f046497..7ff6498679a3 100644
--- a/include/xen/interface/version.h
+++ b/include/xen/interface/version.h
@@ -63,22 +63,4 @@ struct xen_feature_info {
63/* arg == xen_domain_handle_t. */ 63/* arg == xen_domain_handle_t. */
64#define XENVER_guest_handle 8 64#define XENVER_guest_handle 8
65 65
66/* Declares the xen_domain() macros. */
67#include <xen/xen.h>
68
69/* Check if running on Xen version (major, minor) or later */
70static inline bool
71xen_running_on_version_or_later(unsigned int major, unsigned int minor)
72{
73 unsigned int version;
74
75 if (!xen_domain())
76 return false;
77
78 version = HYPERVISOR_xen_version(XENVER_version, NULL);
79 if ((((version >> 16) == major) && ((version & 0xffff) >= minor)) ||
80 ((version >> 16) > major))
81 return true;
82 return false;
83}
84#endif /* __XEN_PUBLIC_VERSION_H__ */ 66#endif /* __XEN_PUBLIC_VERSION_H__ */