. as it is not implemented on it.

Signed-off-by: Konrad Rzeszutek Wilk <konrad.w...@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?

Cc: David Scott <d...@recoil.org>
Cc: Ian Jackson <ian.jack...@eu.citrix.com>
Cc: Wei Liu <wei.l...@citrix.com>
Cc: Andrew Cooper <andrew.coop...@citrix.com>

Cc: Stefano Stabellini <sstabell...@kernel.org>
Cc: Julien Grall <julien.gr...@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

Reply via email to