xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ocaml/xc_get_cpu_featureset/arm: Return not implemented on ARM
@ 2016-04-29  6:38 Konrad Rzeszutek Wilk
  2016-04-29 14:54 ` Wei Liu
  0 siblings, 1 reply; 4+ messages in thread
From: Konrad Rzeszutek Wilk @ 2016-04-29  6:38 UTC (permalink / raw)
  To: xen-devel
  Cc: Stefano Stabellini, Wei Liu, Konrad Rzeszutek Wilk,
	Andrew Cooper, Ian Jackson, Julien Grall, David Scott

. 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?

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

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-05-02  9:14 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
2016-04-29 15:30   ` Andrew Cooper
2016-05-02  9:14     ` Wei Liu

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).