From: Markus Armbruster <armbru@redhat.com>
To: Anthony PERARD <anthony.perard@citrix.com>
Cc: xen-devel@lists.xenproject.org,
Stefano Stabellini <sstabellini@kernel.org>,
qemu-devel@nongnu.org, Paul Durrant <paul.durrant@citrix.com>
Subject: Re: [Xen-devel] [Qemu-devel] [PATCH] xen: Fix ring.h header
Date: Tue, 09 Jul 2019 08:24:52 +0200 [thread overview]
Message-ID: <8736jfafnv.fsf@dusky.pond.sub.org> (raw)
In-Reply-To: <20190704153605.4140-1-anthony.perard@citrix.com> (Anthony PERARD's message of "Thu, 4 Jul 2019 16:36:05 +0100")
Anthony PERARD <anthony.perard@citrix.com> writes:
> 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>
> ---
>
> Notes:
> A similar patch have been sent to the canonical version:
> https://lists.xenproject.org/archives/html/xen-devel/2019-07/msg00370.html
That patch has an additional hunk:
@@ -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
Suggest to include it in this patch, because (1) it's useful (I think),
and (2) it reduces differences to upstream Xen's version.
>
> include/hw/xen/interface/io/ring.h | 6 ------
> 1 file changed, 6 deletions(-)
>
> diff --git a/include/hw/xen/interface/io/ring.h b/include/hw/xen/interface/io/ring.h
> index 1adacf09f9..704990a2c9 100644
> --- a/include/hw/xen/interface/io/ring.h
> +++ b/include/hw/xen/interface/io/ring.h
> @@ -42,12 +42,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. */
Regardless of my suggestion:
Reviewed-by: Markus Armbruster <armbru@redhat.com>
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel
WARNING: multiple messages have this Message-ID (diff)
From: Markus Armbruster <armbru@redhat.com>
To: Anthony PERARD <anthony.perard@citrix.com>
Cc: xen-devel@lists.xenproject.org,
Stefano Stabellini <sstabellini@kernel.org>,
qemu-devel@nongnu.org, Paul Durrant <paul.durrant@citrix.com>
Subject: Re: [Qemu-devel] [PATCH] xen: Fix ring.h header
Date: Tue, 09 Jul 2019 08:24:52 +0200 [thread overview]
Message-ID: <8736jfafnv.fsf@dusky.pond.sub.org> (raw)
In-Reply-To: <20190704153605.4140-1-anthony.perard@citrix.com> (Anthony PERARD's message of "Thu, 4 Jul 2019 16:36:05 +0100")
Anthony PERARD <anthony.perard@citrix.com> writes:
> 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>
> ---
>
> Notes:
> A similar patch have been sent to the canonical version:
> https://lists.xenproject.org/archives/html/xen-devel/2019-07/msg00370.html
That patch has an additional hunk:
@@ -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
Suggest to include it in this patch, because (1) it's useful (I think),
and (2) it reduces differences to upstream Xen's version.
>
> include/hw/xen/interface/io/ring.h | 6 ------
> 1 file changed, 6 deletions(-)
>
> diff --git a/include/hw/xen/interface/io/ring.h b/include/hw/xen/interface/io/ring.h
> index 1adacf09f9..704990a2c9 100644
> --- a/include/hw/xen/interface/io/ring.h
> +++ b/include/hw/xen/interface/io/ring.h
> @@ -42,12 +42,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. */
Regardless of my suggestion:
Reviewed-by: Markus Armbruster <armbru@redhat.com>
next prev parent reply other threads:[~2019-07-09 6:25 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-04 15:36 [Xen-devel] [PATCH] xen: Fix ring.h header Anthony PERARD
2019-07-04 15:36 ` [Qemu-devel] " Anthony PERARD
2019-07-09 6:24 ` Markus Armbruster [this message]
2019-07-09 6:24 ` Markus Armbruster
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8736jfafnv.fsf@dusky.pond.sub.org \
--to=armbru@redhat.com \
--cc=anthony.perard@citrix.com \
--cc=paul.durrant@citrix.com \
--cc=qemu-devel@nongnu.org \
--cc=sstabellini@kernel.org \
--cc=xen-devel@lists.xenproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.