]> git.proxmox.com Git - mirror_edk2.git/blobdiff - OvmfPkg/Include/IndustryStandard/Xen/xen-compat.h
OvmfPkg: Add public headers from Xen Project.
[mirror_edk2.git] / OvmfPkg / Include / IndustryStandard / Xen / xen-compat.h
diff --git a/OvmfPkg/Include/IndustryStandard/Xen/xen-compat.h b/OvmfPkg/Include/IndustryStandard/Xen/xen-compat.h
new file mode 100644 (file)
index 0000000..53b7a3c
--- /dev/null
@@ -0,0 +1,44 @@
+/******************************************************************************\r
+ * xen-compat.h\r
+ * \r
+ * Guest OS interface to Xen.  Compatibility layer.\r
+ * \r
+ * Permission is hereby granted, free of charge, to any person obtaining a copy\r
+ * of this software and associated documentation files (the "Software"), to\r
+ * deal in the Software without restriction, including without limitation the\r
+ * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\r
+ * sell copies of the Software, and to permit persons to whom the Software is\r
+ * furnished to do so, subject to the following conditions:\r
+ *\r
+ * The above copyright notice and this permission notice shall be included in\r
+ * all copies or substantial portions of the Software.\r
+ *\r
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\r
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\r
+ * DEALINGS IN THE SOFTWARE.\r
+ *\r
+ * Copyright (c) 2006, Christian Limpach\r
+ */\r
+\r
+#ifndef __XEN_PUBLIC_XEN_COMPAT_H__\r
+#define __XEN_PUBLIC_XEN_COMPAT_H__\r
+\r
+#define __XEN_LATEST_INTERFACE_VERSION__ 0x00040400\r
+\r
+#if defined(__XEN__) || defined(__XEN_TOOLS__)\r
+/* Xen is built with matching headers and implements the latest interface. */\r
+#define __XEN_INTERFACE_VERSION__ __XEN_LATEST_INTERFACE_VERSION__\r
+#elif !defined(__XEN_INTERFACE_VERSION__)\r
+/* Guests which do not specify a version get the legacy interface. */\r
+#define __XEN_INTERFACE_VERSION__ 0x00000000\r
+#endif\r
+\r
+#if __XEN_INTERFACE_VERSION__ > __XEN_LATEST_INTERFACE_VERSION__\r
+#error "These header files do not support the requested interface version."\r
+#endif\r
+\r
+#endif /* __XEN_PUBLIC_XEN_COMPAT_H__ */\r