KUWAMURA Shin''ya
2010-Oct-29 07:45 UTC
[Xen-devel] [PATCH] libxl: fix compilation errors for ia64
Hi, This patch fixes compilation errors for ia64: libxl.c:112: error: ''XEN_CPUID_INPUT_UNUSED'' undeclared (first use in this function) # cpuid is supported only on x86. Signed-off-by: KUWAMURA Shin''ya <kuwa@jp.fujitsu.com> -- KUWAMURA Shin''ya _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Ian Jackson
2010-Nov-03 12:15 UTC
Re: [Xen-devel] [PATCH] libxl: fix compilation errors for ia64
KUWAMURA Shin''ya writes ("[Xen-devel] [PATCH] libxl: fix
compilation errors for ia64"):> This patch fixes compilation errors for ia64:
> libxl.c:112: error: ''XEN_CPUID_INPUT_UNUSED'' undeclared
(first use in this function)
>
> # cpuid is supported only on x86.
Instead of #ifdefs throughout the files, can we please have a separate
ia64 file where the functions are stubbed out ?
Thanks,
Ian.
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel
KUWAMURA Shin''ya
2010-Nov-05 08:15 UTC
Re: [Xen-devel] [PATCH] libxl: fix compilation errors for ia64
Hi Ian,>>>>> On Wed, 3 Nov 2010 12:15:24 +0000 >>>>> Ian.Jackson@eu.citrix.com(Ian Jackson) said: > > KUWAMURA Shin''ya writes ("[Xen-devel] [PATCH] libxl: fix compilation errors for ia64"): > > This patch fixes compilation errors for ia64: > > libxl.c:112: error: ''XEN_CPUID_INPUT_UNUSED'' undeclared (first use in this function) > > > > # cpuid is supported only on x86. > > Instead of #ifdefs throughout the files, can we please have a separate > ia64 file where the functions are stubbed out ?I moved the following functions from libxl.c to libxl_{,no}cpuid.c: - libxl_cpuid_destroy - libxl_cpuid_parse_config - libxl_cpuid_parse_config_xend Because they use XEN_CPUID_INPUT_UNUSED that is defined only on i386 and x86_64. Any comments? Best regards, -- KUWAMURA Shin''ya _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Ian Jackson
2010-Nov-08 16:17 UTC
Re: [Xen-devel] [PATCH] libxl: fix compilation errors for ia64
KUWAMURA Shin''ya writes ("Re: [Xen-devel] [PATCH] libxl: fix
compilation errors for ia64"):> I moved the following functions from libxl.c to libxl_{,no}cpuid.c:
> - libxl_cpuid_destroy
> - libxl_cpuid_parse_config
> - libxl_cpuid_parse_config_xend
That''s great.
> Because they use XEN_CPUID_INPUT_UNUSED that is defined only on i386
> and x86_64.
>
> Any comments?
This patch is very nearly perfect but I have one small quibble:
> diff -r 0dc0bc411035 tools/libxl/libxl_dom.c
> --- a/tools/libxl/libxl_dom.c Thu Oct 21 18:51:36 2010 +0100
> +++ b/tools/libxl/libxl_dom.c Fri Nov 05 14:45:35 2010 +0900
> @@ -95,11 +95,11 @@
> xs_transaction_t t;
> char **ents;
> int i;
> - char *cpuid_res[4];
>
> #if defined(__i386__) || defined(__x86_64__)
> xc_cpuid_apply_policy(ctx->xch, domid);
> if (info->cpuid != NULL) {
> + char *cpuid_res[4];
> for (i = 0; info->cpuid[i].input[0] != XEN_CPUID_INPUT_UNUSED;
i++)
> xc_cpuid_set(ctx->xch, domid, info->cpuid[i].input,
> (const char**)(info->cpuid[i].policy),
cpuid_res);
I think that the right fix here is to take the whole of that #ifdef
section and move it into a small function so that it can go into
libxl_{no,}cpuid.c.
I would have applied the patch apart from that hunk except that you
didn''t provide a Signed-Off-By. Could you please resubmit which fixes
up that last bit, and which is properly signed off ?
Thanks,
Ian.
>From Documentation/SubmittingPatches:
Developer''s Certificate of Origin 1.1
By making a contribution to this project, I certify that:
(a) The contribution was created in whole or in part by me and I
have the right to submit it under the open source license
indicated in the file; or
(b) The contribution is based upon previous work that, to the best
of my knowledge, is covered under an appropriate open source
license and I have the right under that license to submit that
work with modifications, whether created in whole or in part
by me, under the same open source license (unless I am
permitted to submit under a different license), as indicated
in the file; or
(c) The contribution was provided directly to me by some other
person who certified (a), (b) or (c) and I have not modified
it.
(d) I understand and agree that this project and the contribution
are public and that a record of the contribution (including all
personal information I submit with it, including my sign-off) is
maintained indefinitely and may be redistributed consistent with
this project or the open source license(s) involved.
--
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel
KUWAMURA Shin''ya
2010-Nov-09 05:47 UTC
Re: [Xen-devel] [PATCH] libxl: fix compilation errors for ia64
Hi Ian,>>>>> On Mon, 8 Nov 2010 16:17:03 +0000 >>>>> Ian.Jackson@eu.citrix.com(Ian Jackson) said: > > This patch is very nearly perfect but I have one small quibble: > > > diff -r 0dc0bc411035 tools/libxl/libxl_dom.c > > --- a/tools/libxl/libxl_dom.c Thu Oct 21 18:51:36 2010 +0100 > > +++ b/tools/libxl/libxl_dom.c Fri Nov 05 14:45:35 2010 +0900 > > @@ -95,11 +95,11 @@ > > xs_transaction_t t; > > char **ents; > > int i; > > - char *cpuid_res[4]; > > > > #if defined(__i386__) || defined(__x86_64__) > > xc_cpuid_apply_policy(ctx->xch, domid); > > if (info->cpuid != NULL) { > > + char *cpuid_res[4]; > > for (i = 0; info->cpuid[i].input[0] != XEN_CPUID_INPUT_UNUSED; i++) > > xc_cpuid_set(ctx->xch, domid, info->cpuid[i].input, > > (const char**)(info->cpuid[i].policy), cpuid_res); > > I think that the right fix here is to take the whole of that #ifdef > section and move it into a small function so that it can go into > libxl_{no,}cpuid.c.Ok. I added more two functions: - libxl_cpuid_apply_policy - libxl_cpuid_set I confirmed this patch can be built on both x86_64 and ia64.> I would have applied the patch apart from that hunk except that you > didn''t provide a Signed-Off-By. Could you please resubmit which fixes > up that last bit, and which is properly signed off ?Signed-off-by: KUWAMURA Shin''ya <kuwa@jp.fujitsu.com> Best regards, -- KUWAMURA Shin''ya _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Ian Jackson
2010-Nov-09 17:43 UTC
Re: [Xen-devel] [PATCH] libxl: fix compilation errors for ia64
KUWAMURA Shin''ya writes ("Re: [Xen-devel] [PATCH] libxl: fix
compilation errors for ia64"):> Ok. I added more two functions:
> - libxl_cpuid_apply_policy
> - libxl_cpuid_set
>
> I confirmed this patch can be built on both x86_64 and ia64.
Great, thanks, I have applied your patch.
Ian.
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel