summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorAnthony PERARD2019-07-04 17:36:05 +0200
committerAnthony PERARD2019-08-27 15:18:28 +0200
commitd297e533a5f653336dbc1c5a24ea196391dff9f5 (patch)
treecede90cfd71f48c3261d04f6218df9a1b6da8031 /include
parentMerge remote-tracking branch 'remotes/rth/tags/pull-axp-20190825' into staging (diff)
downloadqemu-d297e533a5f653336dbc1c5a24ea196391dff9f5.tar.gz
qemu-d297e533a5f653336dbc1c5a24ea196391dff9f5.tar.xz
qemu-d297e533a5f653336dbc1c5a24ea196391dff9f5.zip
xen: Fix ring.h header
The xen_[rw]?mb() macros defined in ring.h can't be used and the fact that there are gated behind __XEN_INTERFACE_VERSION__ means that it needs to be defined somewhere. QEMU doesn't implement interfaces with the Xen hypervisor so defining __XEN_INTERFACE_VERSION__ is pointless. This leads to: include/hw/xen/io/ring.h:47:5: error: "__XEN_INTERFACE_VERSION__" is not defined, evaluates to 0 [-Werror=undef] Cleanup ring.h. The xen_*mb() macros are already defined in xenctrl.h which is included in xen_common.h. Reported-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Anthony PERARD <anthony.perard@citrix.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20190704153605.4140-1-anthony.perard@citrix.com> [aperard: Adding the comment proposed upstream] Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
Diffstat (limited to 'include')
-rw-r--r--include/hw/xen/interface/io/ring.h13
1 files changed, 7 insertions, 6 deletions
diff --git a/include/hw/xen/interface/io/ring.h b/include/hw/xen/interface/io/ring.h
index 1adacf09f9..5d048b335c 100644
--- a/include/hw/xen/interface/io/ring.h
+++ b/include/hw/xen/interface/io/ring.h
@@ -33,6 +33,13 @@
* - standard integers types (uint8_t, uint16_t, etc)
* They are provided by stdint.h of the standard headers.
*
+ * Before using the different macros, you need to provide the following
+ * macros:
+ * - xen_mb() a memory barrier
+ * - xen_rmb() a read memory barrier
+ * - xen_wmb() a write memory barrier
+ * Example of those can be found in xenctrl.h.
+ *
* In addition, if you intend to use the FLEX macros, you also need to
* provide the following, before invoking the FLEX macros:
* - size_t
@@ -42,12 +49,6 @@
* and grant_table.h from the Xen public headers.
*/
-#if __XEN_INTERFACE_VERSION__ < 0x00030208
-#define xen_mb() mb()
-#define xen_rmb() rmb()
-#define xen_wmb() wmb()
-#endif
-
typedef unsigned int RING_IDX;
/* Round a 32-bit unsigned constant down to the nearest power of two. */