xen.h (7a8a749da7d30b420291fa0b11e3eda7f72d9b83) xen.h (e2abfe5ec67b69fb310fbeaacf7e68d61d16609e)
1/*
2 * public xen header
3 * stuff needed outside xen-*.c, i.e. interfaces to qemu.
4 * must not depend on any xen headers being present in
5 * /usr/include/xen, so it can be included unconditionally.
6 */
7#ifndef QEMU_HW_XEN_H
8#define QEMU_HW_XEN_H
9
10/*
1/*
2 * public xen header
3 * stuff needed outside xen-*.c, i.e. interfaces to qemu.
4 * must not depend on any xen headers being present in
5 * /usr/include/xen, so it can be included unconditionally.
6 */
7#ifndef QEMU_HW_XEN_H
8#define QEMU_HW_XEN_H
9
10/*
11 * As a temporary measure while the headers are being untangled, define
12 * __XEN_TOOLS__ here before any Xen headers are included. Otherwise, if
13 * the Xen toolstack library headers are later included, they will find
14 * some of the "internal" definitions missing and the build will fail. In
15 * later commits, we'll end up with a rule that the native libraries have
16 * to be included first, which will ensure that the libraries get the
17 * version of Xen libraries that they expect.
11 * C files using Xen toolstack libraries will have included those headers
12 * already via xen_native.h, and having __XEM_TOOLS__ defined will have
13 * automatically set __XEN_INTERFACE_VERSION__ to the latest supported
14 * by the *system* Xen headers which were transitively included.
15 *
16 * C files which are part of the internal emulation, and which did not
17 * include xen_native.h, may need this defined so that the Xen headers
18 * imported to include/hw/xen/interface/ will expose the appropriate API
19 * version.
20 *
21 * This is why there's a rule that xen_native.h must be included first.
18 */
22 */
19#define __XEN_TOOLS__ 1
23#ifndef __XEN_INTERFACE_VERSION__
24#define __XEN_INTERFACE_VERSION__ 0x00040e00
25#endif
20
21#include "exec/cpu-common.h"
22
23/* xen-machine.c */
24enum xen_mode {
25 XEN_DISABLED = 0, /* xen support disabled (default) */
26 XEN_ATTACH, /* attach to xen domain created by libxl */
27 XEN_EMULATE, /* emulate Xen within QEMU */

--- 17 unchanged lines hidden ---
26
27#include "exec/cpu-common.h"
28
29/* xen-machine.c */
30enum xen_mode {
31 XEN_DISABLED = 0, /* xen support disabled (default) */
32 XEN_ATTACH, /* attach to xen domain created by libxl */
33 XEN_EMULATE, /* emulate Xen within QEMU */

--- 17 unchanged lines hidden ---