]> xenbits.xensource.com Git - people/royger/xen-test-framework.git/commitdiff
Introduce xen_version hypercall and ABI
authorAndrew Cooper <andrew.cooper3@citrix.com>
Thu, 24 Mar 2016 12:53:00 +0000 (12:53 +0000)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Thu, 24 Mar 2016 12:53:09 +0000 (12:53 +0000)
Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
include/xen/version.h [new file with mode: 0644]
include/xtf/hypercall.h

diff --git a/include/xen/version.h b/include/xen/version.h
new file mode 100644 (file)
index 0000000..45ce490
--- /dev/null
@@ -0,0 +1,37 @@
+/*
+ * Xen public xen_version hypercall interface
+ */
+#ifndef __XEN_PUBLIC_VERSION_H__
+#define __XEN_PUBLIC_VERSION_H__
+
+/* arg == NULL; returns major:minor (16:16). */
+#define XENVER_version      0
+
+/* arg == xen_extraversion_t. (char[16]) */
+#define XENVER_extraversion 1
+typedef char xen_extraversion_t[16];
+
+/* arg == xen_compile_info_t. */
+#define XENVER_compile_info 2
+struct xen_compile_info {
+    char compiler[64];
+    char compile_by[16];
+    char compile_domain[32];
+    char compile_date[32];
+};
+typedef struct xen_compile_info xen_compile_info_t;
+
+#define XENVER_changeset 4
+typedef char xen_changeset_info_t[64];
+
+#endif /* __XEN_PUBLIC_VERSION_H__ */
+
+/*
+ * Local variables:
+ * mode: C
+ * c-file-style: "BSD"
+ * c-basic-offset: 4
+ * tab-width: 4
+ * indent-tabs-mode: nil
+ * End:
+ */
index 487172fc2f4a339b222bf3f983b31b65b9da5e8b..617a0537bdb8a9fa151cb8619f03c39f2b21a1dc 100644 (file)
@@ -31,6 +31,7 @@ extern uint8_t hypercall_page[PAGE_SIZE];
 #include <xen/sched.h>
 #include <xen/errno.h>
 #include <xen/event_channel.h>
+#include <xen/version.h>
 #include <xen/hvm/hvm_op.h>
 #include <xen/hvm/params.h>
 
@@ -47,6 +48,11 @@ static inline long hypercall_stack_switch(const unsigned int ss, const void *sp)
     return HYPERCALL2(long, __HYPERVISOR_stack_switch, ss, sp);
 }
 
+static inline long hypercall_xen_version(unsigned cmd, void *arg)
+{
+    return HYPERCALL2(long, __HYPERVISOR_xen_version, cmd, arg);
+}
+
 static inline long hypercall_update_va_mapping(void *va, uint64_t npte,
                                                unsigned int flags)
 {