From: Wei Liu <wei.liu2@citrix.com>
To: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Cc: Stefano Stabellini <sstabellini@kernel.org>,
Wei Liu <wei.liu2@citrix.com>,
Andrew Cooper <andrew.cooper3@citrix.com>,
Ian Jackson <ian.jackson@eu.citrix.com>,
Julien Grall <julien.grall@arm.com>,
David Scott <dave@recoil.org>,
xen-devel@lists.xenproject.org
Subject: Re: [PATCH] ocaml/xc_get_cpu_featureset/arm: Return not implemented on ARM
Date: Fri, 29 Apr 2016 15:54:08 +0100 [thread overview]
Message-ID: <20160429145408.GA26957@citrix.com> (raw)
In-Reply-To: <1461911913-11537-1-git-send-email-konrad.wilk@oracle.com>
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@oracle.com>
>
> ---
> 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@recoil.org>
> Cc: Ian Jackson <ian.jackson@eu.citrix.com>
> Cc: Wei Liu <wei.liu2@citrix.com>
> Cc: Andrew Cooper <andrew.cooper3@citrix.com>
>
> Cc: Stefano Stabellini <sstabellini@kernel.org>
> Cc: Julien Grall <julien.grall@arm.com>
> ----
> ---
> 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@lists.xen.org
http://lists.xen.org/xen-devel
next prev parent reply other threads:[~2016-04-29 14:54 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-29 6:38 [PATCH] ocaml/xc_get_cpu_featureset/arm: Return not implemented on ARM Konrad Rzeszutek Wilk
2016-04-29 14:54 ` Wei Liu [this message]
2016-04-29 15:30 ` Andrew Cooper
2016-05-02 9:14 ` Wei Liu
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=20160429145408.GA26957@citrix.com \
--to=wei.liu2@citrix.com \
--cc=andrew.cooper3@citrix.com \
--cc=dave@recoil.org \
--cc=ian.jackson@eu.citrix.com \
--cc=julien.grall@arm.com \
--cc=konrad.wilk@oracle.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).