All of lore.kernel.org
 help / color / mirror / Atom feed
From: Doug Goldstein <cardoe@cardoe.com>
To: Andrew Cooper <andrew.cooper3@citrix.com>,
	Xen-devel <xen-devel@lists.xen.org>
Cc: Wei Liu <wei.liu2@citrix.com>,
	Ian Jackson <Ian.Jackson@eu.citrix.com>,
	Ian Campbell <Ian.Campbell@citrix.com>,
	Jan Beulich <JBeulich@suse.com>
Subject: Re: [PATCH 4/4] hvmloader: Use xen/errno.h rather than the host systems errno.h
Date: Wed, 2 Mar 2016 06:53:30 -0600	[thread overview]
Message-ID: <56D6E24A.60206@cardoe.com> (raw)
In-Reply-To: <1456858641-20776-4-git-send-email-andrew.cooper3@citrix.com>


[-- Attachment #1.1.1: Type: text/plain, Size: 2925 bytes --]

On 3/1/16 12:57 PM, Andrew Cooper wrote:
> hvmloader is unhosted, and shouldn't use the system errno.h.  It already has
> to use Xen's errno.h for other hypercalls.  The use of public/io/xs_wire.h
> requires the use of un-prefixed errno values.
> 
> This fixes the build on stricter toolchains where requesting -fno-builtin does
> reduce the include path as much as it can.
> 
> Reported-by: Doug Goldstein <cardoe@cardoe.com>
> Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>

Reviewed-by: Doug Goldstein <cardoe@cardoe.com>

> ---
> CC: Jan Beulich <JBeulich@suse.com>
> CC: Ian Campbell <Ian.Campbell@citrix.com>
> CC: Ian Jackson <Ian.Jackson@eu.citrix.com>
> CC: Wei Liu <wei.liu2@citrix.com>
> CC: Doug Goldstein <cardoe@cardoe.com>
> 
> v3:
>  * Split single patch multiple fixes
> v2:
>  * Fix compilation.  I am not sure how v1 compiled, but I did definitely check
>    it before posting.
> ---
>  tools/firmware/hvmloader/util.h   | 9 +++++++++
>  tools/firmware/hvmloader/vnuma.c  | 3 +--
>  tools/firmware/hvmloader/xenbus.c | 1 -
>  3 files changed, 10 insertions(+), 3 deletions(-)
> 
> diff --git a/tools/firmware/hvmloader/util.h b/tools/firmware/hvmloader/util.h
> index 132d915..3126817 100644
> --- a/tools/firmware/hvmloader/util.h
> +++ b/tools/firmware/hvmloader/util.h
> @@ -9,6 +9,15 @@
>  #include <xen/hvm/hvm_info_table.h>
>  #include "e820.h"
>  
> +/* Request un-prefixed values from errno.h. */
> +#define XEN_ERRNO(name, value) name = value,
> +enum {
> +#include <xen/errno.h>
> +};
> +
> +/* Cause xs_wire.h to give us xsd_errors[]. */
> +#define EINVAL EINVAL
> +
>  #define __STR(...) #__VA_ARGS__
>  #define STR(...) __STR(__VA_ARGS__)
>  
> diff --git a/tools/firmware/hvmloader/vnuma.c b/tools/firmware/hvmloader/vnuma.c
> index 4121cc6..85c1a79 100644
> --- a/tools/firmware/hvmloader/vnuma.c
> +++ b/tools/firmware/hvmloader/vnuma.c
> @@ -28,7 +28,6 @@
>  #include "util.h"
>  #include "hypercall.h"
>  #include "vnuma.h"
> -#include <xen/errno.h>
>  
>  unsigned int nr_vnodes, nr_vmemranges;
>  unsigned int *vcpu_to_vnode, *vdistance;
> @@ -40,7 +39,7 @@ void init_vnuma_info(void)
>      struct xen_vnuma_topology_info vnuma_topo = { .domid = DOMID_SELF };
>  
>      rc = hypercall_memory_op(XENMEM_get_vnumainfo, &vnuma_topo);
> -    if ( rc != -XEN_ENOBUFS )
> +    if ( rc != -ENOBUFS )
>          return;
>  
>      ASSERT(vnuma_topo.nr_vcpus == hvm_info->nr_vcpus);
> diff --git a/tools/firmware/hvmloader/xenbus.c b/tools/firmware/hvmloader/xenbus.c
> index d0ed993..448157d 100644
> --- a/tools/firmware/hvmloader/xenbus.c
> +++ b/tools/firmware/hvmloader/xenbus.c
> @@ -27,7 +27,6 @@
>  
>  #include "util.h"
>  #include "hypercall.h"
> -#include <errno.h>
>  #include <xen/sched.h>
>  #include <xen/event_channel.h>
>  #include <xen/hvm/params.h>
> 


-- 
Doug Goldstein


[-- Attachment #1.2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 959 bytes --]

[-- Attachment #2: Type: text/plain, Size: 126 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

  reply	other threads:[~2016-03-02 12:53 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-01 18:57 [PATCH 1/4] xen/errno: Introduce EISDIR/EROFS/ENOTEMPTY to the ABI Andrew Cooper
2016-03-01 18:57 ` [PATCH 2/4] xen/errno: Declare aliases using XEN_ERRNO() Andrew Cooper
2016-03-02  2:38   ` Doug Goldstein
2016-03-01 18:57 ` [PATCH 3/4] xen/errno: Reduce complexity of inclusion Andrew Cooper
2016-03-02  2:39   ` Doug Goldstein
2016-03-03  8:30   ` Jan Beulich
2016-03-03 14:14     ` [PATCH v3] " Andrew Cooper
2016-03-04 12:24       ` Jan Beulich
2016-03-04 12:28         ` Jan Beulich
2016-03-04 12:50           ` Andrew Cooper
2016-03-04 13:05             ` Jan Beulich
2016-03-04 16:07               ` Ian Jackson
2016-03-07 15:13                 ` [PATCH v4] " Andrew Cooper
2016-03-01 18:57 ` [PATCH 4/4] hvmloader: Use xen/errno.h rather than the host systems errno.h Andrew Cooper
2016-03-02 12:53   ` Doug Goldstein [this message]
2016-03-03 11:35   ` Wei Liu
2016-03-02  2:37 ` [PATCH 1/4] xen/errno: Introduce EISDIR/EROFS/ENOTEMPTY to the ABI Doug Goldstein

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=56D6E24A.60206@cardoe.com \
    --to=cardoe@cardoe.com \
    --cc=Ian.Campbell@citrix.com \
    --cc=Ian.Jackson@eu.citrix.com \
    --cc=JBeulich@suse.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=wei.liu2@citrix.com \
    --cc=xen-devel@lists.xen.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.