summary refs log tree commit diff stats
path: root/include/hw/xen/xen.h
diff options
context:
space:
mode:
authorJoao Martins <joao.m.martins@oracle.com>2019-02-13 12:29:47 -0500
committerDavid Woodhouse <dwmw@amazon.co.uk>2023-03-01 08:22:49 +0000
commit50c88402ca599e577f025e78a4380431be2b3f6d (patch)
treeac09c2b7aa135e76d1a549bf08be8ff701a43569 /include/hw/xen/xen.h
parent627634031092e1514f363fd8659a579398de0f0e (diff)
downloadfocaccia-qemu-50c88402ca599e577f025e78a4380431be2b3f6d.tar.gz
focaccia-qemu-50c88402ca599e577f025e78a4380431be2b3f6d.zip
include: import Xen public headers to hw/xen/interface
There's already a partial set here; update them and pull in a more
complete set.

To start with, define __XEN_TOOLS__ in hw/xen/xen.h to ensure that any
internal definitions needed by Xen toolstack libraries are present
regardless of the order in which the headers are included. A reckoning
will come later, once we make the PV backends work in emulation and
untangle the headers for Xen-native vs. generic parts.

Signed-off-by: Joao Martins <joao.m.martins@oracle.com>
[dwmw2: Update to Xen public headers from 4.16.2 release, add some in io/,
        define __XEN_TOOLS__ in hw/xen/xen.h, move to hw/xen/interface/]
Signed-off-by: David Woodhouse <dwmw@amazon.co.uk>
Reviewed-by: Paul Durrant <paul@xen.org>
Diffstat (limited to 'include/hw/xen/xen.h')
-rw-r--r--include/hw/xen/xen.h16
1 files changed, 13 insertions, 3 deletions
diff --git a/include/hw/xen/xen.h b/include/hw/xen/xen.h
index afdf9c436a..4d412fd4b2 100644
--- a/include/hw/xen/xen.h
+++ b/include/hw/xen/xen.h
@@ -1,12 +1,22 @@
-#ifndef QEMU_HW_XEN_H
-#define QEMU_HW_XEN_H
-
 /*
  * public xen header
  *   stuff needed outside xen-*.c, i.e. interfaces to qemu.
  *   must not depend on any xen headers being present in
  *   /usr/include/xen, so it can be included unconditionally.
  */
+#ifndef QEMU_HW_XEN_H
+#define QEMU_HW_XEN_H
+
+/*
+ * As a temporary measure while the headers are being untangled, define
+ * __XEN_TOOLS__ here before any Xen headers are included. Otherwise, if
+ * the Xen toolstack library headers are later included, they will find
+ * some of the "internal" definitions missing and the build will fail. In
+ * later commits, we'll end up with a rule that the native libraries have
+ * to be included first, which will ensure that the libraries get the
+ * version of Xen libraries that they expect.
+ */
+#define __XEN_TOOLS__ 1
 
 #include "exec/cpu-common.h"