Merge commit '413fb2412d' into stable-0.11
[qemu-kvm/fedora.git] / hw / xen_common.h
blob7562567b5af24e22dda3715ece1fba2b607e9c20
1 #ifndef QEMU_HW_XEN_COMMON_H
2 #define QEMU_HW_XEN_COMMON_H 1
4 #include <stddef.h>
5 #include <inttypes.h>
7 #include <xenctrl.h>
8 #include <xs.h>
9 #include <xen/io/xenbus.h>
11 #include "hw.h"
12 #include "xen.h"
13 #include "sys-queue.h" /* BSD list implementation */
16 * tweaks needed to build with different xen versions
17 * 0x00030205 -> 3.1.0
18 * 0x00030207 -> 3.2.0
19 * 0x00030208 -> unstable
21 #include <xen/xen-compat.h>
22 #if __XEN_LATEST_INTERFACE_VERSION__ < 0x00030205
23 # define evtchn_port_or_error_t int
24 #endif
25 #if __XEN_LATEST_INTERFACE_VERSION__ < 0x00030207
26 # define xc_map_foreign_pages xc_map_foreign_batch
27 #endif
28 #if __XEN_LATEST_INTERFACE_VERSION__ < 0x00030208
29 # define xen_mb() mb()
30 # define xen_rmb() rmb()
31 # define xen_wmb() wmb()
32 #endif
34 #endif /* QEMU_HW_XEN_COMMON_H */