[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH] ocaml/xc_get_cpu_featureset/arm: Return not implemented on ARM



On Fri, Apr 29, 2016 at 02:38:33AM -0400, Konrad Rzeszutek Wilk wrote:
> . as it is not implemented on it.
> 
> Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>
> 
> ---
> v1: Initial botched patch that didn't compile.
> v2: Andrew mentioned to "need to set ENOSYS in the xch last
>     error." - but we do not use 'failwith_xc', and:
>        a). The error codes you set are no EXX type.
>        b). The best I can do is set errno=ENOSYS; Is that what you would like?
> 

As far as I can tell this change follows existing pattern so it's
probably fine. But I will wait until some ocaml experts chime in.

> Cc: David Scott <dave@xxxxxxxxxx>
> Cc: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
> Cc: Wei Liu <wei.liu2@xxxxxxxxxx>
> Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
> 
> Cc: Stefano Stabellini <sstabellini@xxxxxxxxxx>
> Cc: Julien Grall <julien.grall@xxxxxxx>
> ----
> ---
>  tools/ocaml/libs/xc/xenctrl_stubs.c | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/tools/ocaml/libs/xc/xenctrl_stubs.c 
> b/tools/ocaml/libs/xc/xenctrl_stubs.c
> index 5477df3..5e45551 100644
> --- a/tools/ocaml/libs/xc/xenctrl_stubs.c
> +++ b/tools/ocaml/libs/xc/xenctrl_stubs.c
> @@ -1218,6 +1218,7 @@ CAMLprim value stub_xc_get_cpu_featureset(value xch, 
> value idx)
>  {
>       CAMLparam2(xch, idx);
>       CAMLlocal1(bitmap_val);
> +#if defined(__i386__) || defined(__x86_64__)
>  
>       /* Safe, because of the global ocaml lock. */
>       static uint32_t fs_len;
> @@ -1245,7 +1246,9 @@ CAMLprim value stub_xc_get_cpu_featureset(value xch, 
> value idx)
>               for (i = 0; i < len; ++i)
>                       Store_field(bitmap_val, i, caml_copy_int64(fs[i]));
>       }
> -
> +#else
> +     caml_failwith("xc_get_cpu_featureset: not implemented");
> +#endif
>       CAMLreturn(bitmap_val);
>  }
>  
> -- 
> 2.5.0
> 

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

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.