xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Cooper <andrew.cooper3@citrix.com>
To: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>,
	julien.grall@arm.com, sstabellini@kernel.org,
	xen-devel@lists.xensource.com, jonathan.davies@citrix.com,
	jonathan.ludlam@citrix.com, euan.harris@citrix.com
Subject: Re: OCaml compilation issues (staging) under ARM32 (ocaml-4.01)
Date: Wed, 13 Apr 2016 22:06:05 +0100	[thread overview]
Message-ID: <570EB4BD.3020704@citrix.com> (raw)
In-Reply-To: <20160413202849.GA5962@char.us.oracle.com>

On 13/04/2016 21:28, Konrad Rzeszutek Wilk wrote:
> Hey,
>
> As I was testing xSplice I had compile issues to Andrew's CPUID work
> which was easy to fix:
>
> diff --git a/tools/ocaml/libs/xc/xenctrl_stubs.c b/tools/ocaml/libs/xc/xenctrl_stubs.c
> index 5477df3..881f1b4 100644
> --- a/tools/ocaml/libs/xc/xenctrl_stubs.c
> +++ b/tools/ocaml/libs/xc/xenctrl_stubs.c
> @@ -1216,8 +1216,9 @@ CAMLprim value stub_xc_domain_deassign_device(value xch, value domid, value desc
>  
>  CAMLprim value stub_xc_get_cpu_featureset(value xch, value idx)
>  {
> -       CAMLparam2(xch, idx);
>         CAMLlocal1(bitmap_val);
> +#if defined(__i386__) || defined(__x86_64__)
> +       CAMLparam2(xch, idx);

The CAMLparam2 is mandatory.  Even if the function has no arguments, you
need a CAMLparam0 to do prolog interaction with the runtime.

>  
>         /* 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_domain_cpuid_set: not implemented");

That would be "xc_get_cpu_featureset" rather than set, and you also need
to set ENOSYS in the xch last error.

OTOH, caml_failwith() is Noreturn, so you can use it without a
subsequent return statement.

> +#endif
>         CAMLreturn(bitmap_val);
>  }
>  


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

  reply	other threads:[~2016-04-13 21:06 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-13 20:28 OCaml compilation issues (staging) under ARM32 (ocaml-4.01) Konrad Rzeszutek Wilk
2016-04-13 21:06 ` Andrew Cooper [this message]
2016-04-14 11:26 ` Julien Grall

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=570EB4BD.3020704@citrix.com \
    --to=andrew.cooper3@citrix.com \
    --cc=euan.harris@citrix.com \
    --cc=jonathan.davies@citrix.com \
    --cc=jonathan.ludlam@citrix.com \
    --cc=julien.grall@arm.com \
    --cc=konrad.wilk@oracle.com \
    --cc=sstabellini@kernel.org \
    --cc=xen-devel@lists.xensource.com \
    /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).