Vincent Hanquez
2010-Apr-23 14:31 UTC
[Xen-devel] [PATCH 00/10][RFC][v2] merge ocaml xenstored and dependencies
Add ocaml xenstored into xen as an alternative to C xenstored. The goal is to choose it as the default xenstored on the target machine when it has been built. build hook mechanism is not ideal, but should be safe for platform that cannot build ocaml and/or would have some portability issues. This is RFC, although the first 5 patches are completly safe since they just introduce new files and hook with default =n the new files. only the 6th patch make the default to build ocaml tools with fallback if not available. since v1: * rebased to latest xen-unstable * remove stdext ocaml library and folded dependencies into xenstored * split dependencies in smaller patches Vincent Hanquez (10): add ocaml mmap bindings implementation. add ocaml XC bindings. add XS ocaml bindings. add uuid ocaml bindings add logs ocaml bindings add ocaml xenstored add compilation makefile to ocaml directory remove hook from external ocaml repository add ocaml tools to build if defined. default to n default ocaml tools config variable to y Config.mk | 15 +- tools/Makefile | 23 +- tools/ocaml/Makefile | 36 + tools/ocaml/Makefile.rules | 93 ++ tools/ocaml/common.make | 28 + tools/ocaml/libs/eventchn/META.in | 4 + tools/ocaml/libs/eventchn/Makefile | 28 + tools/ocaml/libs/eventchn/eventchn.ml | 27 + tools/ocaml/libs/eventchn/eventchn.mli | 26 + tools/ocaml/libs/eventchn/eventchn_stubs.c | 173 ++++ tools/ocaml/libs/log/META.in | 4 + tools/ocaml/libs/log/Makefile | 41 + tools/ocaml/libs/log/log.ml | 258 +++++ tools/ocaml/libs/log/log.mli | 55 + tools/ocaml/libs/log/logs.ml | 197 ++++ tools/ocaml/libs/log/logs.mli | 46 + tools/ocaml/libs/log/syslog.ml | 26 + tools/ocaml/libs/log/syslog.mli | 41 + tools/ocaml/libs/log/syslog_stubs.c | 73 ++ tools/ocaml/libs/mmap/META.in | 4 + tools/ocaml/libs/mmap/Makefile | 27 + tools/ocaml/libs/mmap/mmap.ml | 31 + tools/ocaml/libs/mmap/mmap.mli | 28 + tools/ocaml/libs/mmap/mmap_stubs.c | 136 +++ tools/ocaml/libs/mmap/mmap_stubs.h | 33 + tools/ocaml/libs/uuid/META.in | 4 + tools/ocaml/libs/uuid/Makefile | 26 + tools/ocaml/libs/uuid/uuid.ml | 88 ++ tools/ocaml/libs/uuid/uuid.mli | 53 + tools/ocaml/libs/xb/META.in | 4 + tools/ocaml/libs/xb/Makefile | 41 + tools/ocaml/libs/xb/op.ml | 84 ++ tools/ocaml/libs/xb/packet.ml | 50 + tools/ocaml/libs/xb/partial.ml | 44 + tools/ocaml/libs/xb/xb.ml | 189 ++++ tools/ocaml/libs/xb/xb.mli | 83 ++ tools/ocaml/libs/xb/xb_stubs.c | 74 ++ tools/ocaml/libs/xb/xs_ring.ml | 18 + tools/ocaml/libs/xb/xs_ring_stubs.c | 117 +++ tools/ocaml/libs/xc/META.in | 4 + tools/ocaml/libs/xc/Makefile | 28 + tools/ocaml/libs/xc/xc.h | 191 ++++ tools/ocaml/libs/xc/xc.ml | 340 +++++++ tools/ocaml/libs/xc/xc.mli | 196 ++++ tools/ocaml/libs/xc/xc_cpufeature.h | 116 +++ tools/ocaml/libs/xc/xc_cpuid.h | 285 ++++++ tools/ocaml/libs/xc/xc_e820.h | 20 + tools/ocaml/libs/xc/xc_lib.c | 1502 ++++++++++++++++++++++++++++ tools/ocaml/libs/xc/xc_stubs.c | 1170 ++++++++++++++++++++++ tools/ocaml/libs/xs/META.in | 4 + tools/ocaml/libs/xs/Makefile | 42 + tools/ocaml/libs/xs/queueop.ml | 73 ++ tools/ocaml/libs/xs/xs.ml | 170 ++++ tools/ocaml/libs/xs/xs.mli | 90 ++ tools/ocaml/libs/xs/xsraw.ml | 265 +++++ tools/ocaml/libs/xs/xsraw.mli | 60 ++ tools/ocaml/libs/xs/xst.ml | 61 ++ tools/ocaml/libs/xs/xst.mli | 30 + tools/ocaml/xenstored/Makefile | 54 + tools/ocaml/xenstored/config.ml | 112 ++ tools/ocaml/xenstored/connection.ml | 234 +++++ tools/ocaml/xenstored/connections.ml | 167 +++ tools/ocaml/xenstored/define.ml | 40 + tools/ocaml/xenstored/disk.ml | 157 +++ tools/ocaml/xenstored/domain.ml | 62 ++ tools/ocaml/xenstored/domains.ml | 84 ++ tools/ocaml/xenstored/event.ml | 29 + tools/ocaml/xenstored/logging.ml | 239 +++++ tools/ocaml/xenstored/parse_arg.ml | 68 ++ tools/ocaml/xenstored/perms.ml | 167 +++ tools/ocaml/xenstored/process.ml | 396 ++++++++ tools/ocaml/xenstored/quota.ml | 83 ++ tools/ocaml/xenstored/store.ml | 461 +++++++++ tools/ocaml/xenstored/symbol.ml | 76 ++ tools/ocaml/xenstored/symbol.mli | 52 + tools/ocaml/xenstored/transaction.ml | 198 ++++ tools/ocaml/xenstored/utils.ml | 107 ++ tools/ocaml/xenstored/xenstored.conf | 30 + tools/ocaml/xenstored/xenstored.ml | 404 ++++++++ tools/xenstore/Makefile | 5 - 80 files changed, 10168 insertions(+), 32 deletions(-) create mode 100644 tools/ocaml/Makefile create mode 100644 tools/ocaml/Makefile.rules create mode 100644 tools/ocaml/common.make create mode 100644 tools/ocaml/libs/eventchn/META.in create mode 100644 tools/ocaml/libs/eventchn/Makefile create mode 100644 tools/ocaml/libs/eventchn/eventchn.ml create mode 100644 tools/ocaml/libs/eventchn/eventchn.mli create mode 100644 tools/ocaml/libs/eventchn/eventchn_stubs.c create mode 100644 tools/ocaml/libs/log/META.in create mode 100644 tools/ocaml/libs/log/Makefile create mode 100644 tools/ocaml/libs/log/log.ml create mode 100644 tools/ocaml/libs/log/log.mli create mode 100644 tools/ocaml/libs/log/logs.ml create mode 100644 tools/ocaml/libs/log/logs.mli create mode 100644 tools/ocaml/libs/log/syslog.ml create mode 100644 tools/ocaml/libs/log/syslog.mli create mode 100644 tools/ocaml/libs/log/syslog_stubs.c create mode 100644 tools/ocaml/libs/mmap/META.in create mode 100644 tools/ocaml/libs/mmap/Makefile create mode 100644 tools/ocaml/libs/mmap/mmap.ml create mode 100644 tools/ocaml/libs/mmap/mmap.mli create mode 100644 tools/ocaml/libs/mmap/mmap_stubs.c create mode 100644 tools/ocaml/libs/mmap/mmap_stubs.h create mode 100644 tools/ocaml/libs/uuid/META.in create mode 100644 tools/ocaml/libs/uuid/Makefile create mode 100644 tools/ocaml/libs/uuid/uuid.ml create mode 100644 tools/ocaml/libs/uuid/uuid.mli create mode 100644 tools/ocaml/libs/xb/META.in create mode 100644 tools/ocaml/libs/xb/Makefile create mode 100644 tools/ocaml/libs/xb/op.ml create mode 100644 tools/ocaml/libs/xb/packet.ml create mode 100644 tools/ocaml/libs/xb/partial.ml create mode 100644 tools/ocaml/libs/xb/xb.ml create mode 100644 tools/ocaml/libs/xb/xb.mli create mode 100644 tools/ocaml/libs/xb/xb_stubs.c create mode 100644 tools/ocaml/libs/xb/xs_ring.ml create mode 100644 tools/ocaml/libs/xb/xs_ring_stubs.c create mode 100644 tools/ocaml/libs/xc/META.in create mode 100644 tools/ocaml/libs/xc/Makefile create mode 100644 tools/ocaml/libs/xc/xc.h create mode 100644 tools/ocaml/libs/xc/xc.ml create mode 100644 tools/ocaml/libs/xc/xc.mli create mode 100644 tools/ocaml/libs/xc/xc_cpufeature.h create mode 100644 tools/ocaml/libs/xc/xc_cpuid.h create mode 100644 tools/ocaml/libs/xc/xc_e820.h create mode 100644 tools/ocaml/libs/xc/xc_lib.c create mode 100644 tools/ocaml/libs/xc/xc_stubs.c create mode 100644 tools/ocaml/libs/xs/META.in create mode 100644 tools/ocaml/libs/xs/Makefile create mode 100644 tools/ocaml/libs/xs/queueop.ml create mode 100644 tools/ocaml/libs/xs/xs.ml create mode 100644 tools/ocaml/libs/xs/xs.mli create mode 100644 tools/ocaml/libs/xs/xsraw.ml create mode 100644 tools/ocaml/libs/xs/xsraw.mli create mode 100644 tools/ocaml/libs/xs/xst.ml create mode 100644 tools/ocaml/libs/xs/xst.mli create mode 100644 tools/ocaml/xenstored/Makefile create mode 100644 tools/ocaml/xenstored/config.ml create mode 100644 tools/ocaml/xenstored/connection.ml create mode 100644 tools/ocaml/xenstored/connections.ml create mode 100644 tools/ocaml/xenstored/define.ml create mode 100644 tools/ocaml/xenstored/disk.ml create mode 100644 tools/ocaml/xenstored/domain.ml create mode 100644 tools/ocaml/xenstored/domains.ml create mode 100644 tools/ocaml/xenstored/event.ml create mode 100644 tools/ocaml/xenstored/logging.ml create mode 100644 tools/ocaml/xenstored/parse_arg.ml create mode 100644 tools/ocaml/xenstored/perms.ml create mode 100644 tools/ocaml/xenstored/process.ml create mode 100644 tools/ocaml/xenstored/quota.ml create mode 100644 tools/ocaml/xenstored/store.ml create mode 100644 tools/ocaml/xenstored/symbol.ml create mode 100644 tools/ocaml/xenstored/symbol.mli create mode 100644 tools/ocaml/xenstored/transaction.ml create mode 100644 tools/ocaml/xenstored/utils.ml create mode 100644 tools/ocaml/xenstored/xenstored.conf create mode 100644 tools/ocaml/xenstored/xenstored.ml _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Vincent Hanquez
2010-Apr-23 14:31 UTC
[Xen-devel] [PATCH 01/10] add ocaml mmap bindings implementation.
this is quite similar to the mmap functionality available in bigarray but it''s less complicated. Signed-off-by: Vincent Hanquez <vincent.hanquez@eu.citrix.com> --- tools/ocaml/libs/mmap/META.in | 4 + tools/ocaml/libs/mmap/Makefile | 27 +++++++ tools/ocaml/libs/mmap/mmap.ml | 31 ++++++++ tools/ocaml/libs/mmap/mmap.mli | 28 ++++++++ tools/ocaml/libs/mmap/mmap_stubs.c | 136 ++++++++++++++++++++++++++++++++++++ tools/ocaml/libs/mmap/mmap_stubs.h | 33 +++++++++ 6 files changed, 259 insertions(+), 0 deletions(-) create mode 100644 tools/ocaml/libs/mmap/META.in create mode 100644 tools/ocaml/libs/mmap/Makefile create mode 100644 tools/ocaml/libs/mmap/mmap.ml create mode 100644 tools/ocaml/libs/mmap/mmap.mli create mode 100644 tools/ocaml/libs/mmap/mmap_stubs.c create mode 100644 tools/ocaml/libs/mmap/mmap_stubs.h _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
this include a small and simpler reimplementation of libxc. Signed-off-by: Vincent Hanquez <vincent.hanquez@eu.citrix.com> --- tools/ocaml/libs/xc/META.in | 4 + tools/ocaml/libs/xc/Makefile | 28 + tools/ocaml/libs/xc/xc.h | 191 +++++ tools/ocaml/libs/xc/xc.ml | 340 ++++++++ tools/ocaml/libs/xc/xc.mli | 196 +++++ tools/ocaml/libs/xc/xc_cpufeature.h | 116 +++ tools/ocaml/libs/xc/xc_cpuid.h | 285 +++++++ tools/ocaml/libs/xc/xc_e820.h | 20 + tools/ocaml/libs/xc/xc_lib.c | 1502 +++++++++++++++++++++++++++++++++++ tools/ocaml/libs/xc/xc_stubs.c | 1170 +++++++++++++++++++++++++++ 10 files changed, 3852 insertions(+), 0 deletions(-) create mode 100644 tools/ocaml/libs/xc/META.in create mode 100644 tools/ocaml/libs/xc/Makefile create mode 100644 tools/ocaml/libs/xc/xc.h create mode 100644 tools/ocaml/libs/xc/xc.ml create mode 100644 tools/ocaml/libs/xc/xc.mli create mode 100644 tools/ocaml/libs/xc/xc_cpufeature.h create mode 100644 tools/ocaml/libs/xc/xc_cpuid.h create mode 100644 tools/ocaml/libs/xc/xc_e820.h create mode 100644 tools/ocaml/libs/xc/xc_lib.c create mode 100644 tools/ocaml/libs/xc/xc_stubs.c _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Signed-off-by: Vincent Hanquez <vincent.hanquez@eu.citrix.com> --- tools/ocaml/libs/eventchn/META.in | 4 + tools/ocaml/libs/eventchn/Makefile | 28 +++ tools/ocaml/libs/eventchn/eventchn.ml | 27 +++ tools/ocaml/libs/eventchn/eventchn.mli | 26 +++ tools/ocaml/libs/eventchn/eventchn_stubs.c | 173 ++++++++++++++++++ tools/ocaml/libs/xb/META.in | 4 + tools/ocaml/libs/xb/Makefile | 41 +++++ tools/ocaml/libs/xb/op.ml | 84 +++++++++ tools/ocaml/libs/xb/packet.ml | 50 ++++++ tools/ocaml/libs/xb/partial.ml | 44 +++++ tools/ocaml/libs/xb/xb.ml | 189 ++++++++++++++++++++ tools/ocaml/libs/xb/xb.mli | 83 +++++++++ tools/ocaml/libs/xb/xb_stubs.c | 74 ++++++++ tools/ocaml/libs/xb/xs_ring.ml | 18 ++ tools/ocaml/libs/xb/xs_ring_stubs.c | 117 ++++++++++++ tools/ocaml/libs/xs/META.in | 4 + tools/ocaml/libs/xs/Makefile | 42 +++++ tools/ocaml/libs/xs/queueop.ml | 73 ++++++++ tools/ocaml/libs/xs/xs.ml | 170 ++++++++++++++++++ tools/ocaml/libs/xs/xs.mli | 90 ++++++++++ tools/ocaml/libs/xs/xsraw.ml | 265 ++++++++++++++++++++++++++++ tools/ocaml/libs/xs/xsraw.mli | 60 +++++++ tools/ocaml/libs/xs/xst.ml | 61 +++++++ tools/ocaml/libs/xs/xst.mli | 30 +++ 24 files changed, 1757 insertions(+), 0 deletions(-) create mode 100644 tools/ocaml/libs/eventchn/META.in create mode 100644 tools/ocaml/libs/eventchn/Makefile create mode 100644 tools/ocaml/libs/eventchn/eventchn.ml create mode 100644 tools/ocaml/libs/eventchn/eventchn.mli create mode 100644 tools/ocaml/libs/eventchn/eventchn_stubs.c create mode 100644 tools/ocaml/libs/xb/META.in create mode 100644 tools/ocaml/libs/xb/Makefile create mode 100644 tools/ocaml/libs/xb/op.ml create mode 100644 tools/ocaml/libs/xb/packet.ml create mode 100644 tools/ocaml/libs/xb/partial.ml create mode 100644 tools/ocaml/libs/xb/xb.ml create mode 100644 tools/ocaml/libs/xb/xb.mli create mode 100644 tools/ocaml/libs/xb/xb_stubs.c create mode 100644 tools/ocaml/libs/xb/xs_ring.ml create mode 100644 tools/ocaml/libs/xb/xs_ring_stubs.c create mode 100644 tools/ocaml/libs/xs/META.in create mode 100644 tools/ocaml/libs/xs/Makefile create mode 100644 tools/ocaml/libs/xs/queueop.ml create mode 100644 tools/ocaml/libs/xs/xs.ml create mode 100644 tools/ocaml/libs/xs/xs.mli create mode 100644 tools/ocaml/libs/xs/xsraw.ml create mode 100644 tools/ocaml/libs/xs/xsraw.mli create mode 100644 tools/ocaml/libs/xs/xst.ml create mode 100644 tools/ocaml/libs/xs/xst.mli _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Signed-off-by: Vincent Hanquez <vincent.hanquez@eu.citrix.com> --- tools/ocaml/libs/uuid/META.in | 4 ++ tools/ocaml/libs/uuid/Makefile | 26 ++++++++++++ tools/ocaml/libs/uuid/uuid.ml | 88 ++++++++++++++++++++++++++++++++++++++++ tools/ocaml/libs/uuid/uuid.mli | 53 ++++++++++++++++++++++++ 4 files changed, 171 insertions(+), 0 deletions(-) create mode 100644 tools/ocaml/libs/uuid/META.in create mode 100644 tools/ocaml/libs/uuid/Makefile create mode 100644 tools/ocaml/libs/uuid/uuid.ml create mode 100644 tools/ocaml/libs/uuid/uuid.mli _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Signed-off-by: Vincent Hanquez <vincent.hanquez@eu.citrix.com> --- tools/ocaml/libs/log/META.in | 4 + tools/ocaml/libs/log/Makefile | 41 ++++++ tools/ocaml/libs/log/log.ml | 258 +++++++++++++++++++++++++++++++++++ tools/ocaml/libs/log/log.mli | 55 ++++++++ tools/ocaml/libs/log/logs.ml | 197 ++++++++++++++++++++++++++ tools/ocaml/libs/log/logs.mli | 46 ++++++ tools/ocaml/libs/log/syslog.ml | 26 ++++ tools/ocaml/libs/log/syslog.mli | 41 ++++++ tools/ocaml/libs/log/syslog_stubs.c | 73 ++++++++++ 9 files changed, 741 insertions(+), 0 deletions(-) create mode 100644 tools/ocaml/libs/log/META.in create mode 100644 tools/ocaml/libs/log/Makefile create mode 100644 tools/ocaml/libs/log/log.ml create mode 100644 tools/ocaml/libs/log/log.mli create mode 100644 tools/ocaml/libs/log/logs.ml create mode 100644 tools/ocaml/libs/log/logs.mli create mode 100644 tools/ocaml/libs/log/syslog.ml create mode 100644 tools/ocaml/libs/log/syslog.mli create mode 100644 tools/ocaml/libs/log/syslog_stubs.c _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Signed-off-by: Vincent Hanquez <vincent.hanquez@eu.citrix.com> --- tools/ocaml/xenstored/Makefile | 54 ++++ tools/ocaml/xenstored/config.ml | 112 ++++++++ tools/ocaml/xenstored/connection.ml | 234 +++++++++++++++++ tools/ocaml/xenstored/connections.ml | 167 ++++++++++++ tools/ocaml/xenstored/define.ml | 40 +++ tools/ocaml/xenstored/disk.ml | 157 ++++++++++++ tools/ocaml/xenstored/domain.ml | 62 +++++ tools/ocaml/xenstored/domains.ml | 84 ++++++ tools/ocaml/xenstored/event.ml | 29 +++ tools/ocaml/xenstored/logging.ml | 239 ++++++++++++++++++ tools/ocaml/xenstored/parse_arg.ml | 68 +++++ tools/ocaml/xenstored/perms.ml | 167 ++++++++++++ tools/ocaml/xenstored/process.ml | 396 +++++++++++++++++++++++++++++ tools/ocaml/xenstored/quota.ml | 83 ++++++ tools/ocaml/xenstored/store.ml | 461 ++++++++++++++++++++++++++++++++++ tools/ocaml/xenstored/symbol.ml | 76 ++++++ tools/ocaml/xenstored/symbol.mli | 52 ++++ tools/ocaml/xenstored/transaction.ml | 198 +++++++++++++++ tools/ocaml/xenstored/utils.ml | 107 ++++++++ tools/ocaml/xenstored/xenstored.conf | 30 +++ tools/ocaml/xenstored/xenstored.ml | 404 +++++++++++++++++++++++++++++ 21 files changed, 3220 insertions(+), 0 deletions(-) create mode 100644 tools/ocaml/xenstored/Makefile create mode 100644 tools/ocaml/xenstored/config.ml create mode 100644 tools/ocaml/xenstored/connection.ml create mode 100644 tools/ocaml/xenstored/connections.ml create mode 100644 tools/ocaml/xenstored/define.ml create mode 100644 tools/ocaml/xenstored/disk.ml create mode 100644 tools/ocaml/xenstored/domain.ml create mode 100644 tools/ocaml/xenstored/domains.ml create mode 100644 tools/ocaml/xenstored/event.ml create mode 100644 tools/ocaml/xenstored/logging.ml create mode 100644 tools/ocaml/xenstored/parse_arg.ml create mode 100644 tools/ocaml/xenstored/perms.ml create mode 100644 tools/ocaml/xenstored/process.ml create mode 100644 tools/ocaml/xenstored/quota.ml create mode 100644 tools/ocaml/xenstored/store.ml create mode 100644 tools/ocaml/xenstored/symbol.ml create mode 100644 tools/ocaml/xenstored/symbol.mli create mode 100644 tools/ocaml/xenstored/transaction.ml create mode 100644 tools/ocaml/xenstored/utils.ml create mode 100644 tools/ocaml/xenstored/xenstored.conf create mode 100644 tools/ocaml/xenstored/xenstored.ml _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Vincent Hanquez
2010-Apr-23 14:31 UTC
[Xen-devel] [PATCH 07/10] add compilation makefile to ocaml directory
Signed-off-by: Vincent Hanquez <vincent.hanquez@eu.citrix.com> --- tools/ocaml/Makefile | 36 +++++++++++++++++ tools/ocaml/Makefile.rules | 93 ++++++++++++++++++++++++++++++++++++++++++++ tools/ocaml/common.make | 28 +++++++++++++ 3 files changed, 157 insertions(+), 0 deletions(-) create mode 100644 tools/ocaml/Makefile create mode 100644 tools/ocaml/Makefile.rules create mode 100644 tools/ocaml/common.make _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Vincent Hanquez
2010-Apr-23 14:31 UTC
[Xen-devel] [PATCH 08/10] remove hook from external ocaml repository
Signed-off-by: Vincent Hanquez <vincent.hanquez@eu.citrix.com> --- Config.mk | 6 ------ tools/Makefile | 21 --------------------- tools/xenstore/Makefile | 5 ----- 3 files changed, 0 insertions(+), 32 deletions(-) _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Vincent Hanquez
2010-Apr-23 14:31 UTC
[Xen-devel] [PATCH 09/10] add ocaml tools to build if defined. default to n
Signed-off-by: Vincent Hanquez <vincent.hanquez@eu.citrix.com> --- Config.mk | 1 + tools/Makefile | 2 ++ 2 files changed, 3 insertions(+), 0 deletions(-) _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Vincent Hanquez
2010-Apr-23 14:31 UTC
[Xen-devel] [PATCH 10/10] default ocaml tools config variable to y
fallback mechanism if ocamlopt is not available or if we don''t compile on a linux system (probably need portability fixes for solaris/netbsd/etc). Signed-off-by: Vincent Hanquez <vincent.hanquez@eu.citrix.com> --- Config.mk | 10 +++++++++- 1 files changed, 9 insertions(+), 1 deletions(-) _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Dulloor
2010-Apr-23 16:04 UTC
Re: [Xen-devel] [PATCH 00/10][RFC][v2] merge ocaml xenstored and dependencies
If there are any features and/or additions to XenStore protocol in the Ocaml version, is there a plan to do it in the C version too ? -dulloor On Fri, Apr 23, 2010 at 10:31 AM, Vincent Hanquez <vincent.hanquez@eu.citrix.com> wrote:> Add ocaml xenstored into xen as an alternative to C xenstored. > The goal is to choose it as the default xenstored on the target machine when it has > been built. > > build hook mechanism is not ideal, but should be safe for platform that > cannot build ocaml and/or would have some portability issues. > > This is RFC, although the first 5 patches are completly safe since they just > introduce new files and hook with default =n the new files. only the 6th patch > make the default to build ocaml tools with fallback if not available. > > since v1: > * rebased to latest xen-unstable > * remove stdext ocaml library and folded dependencies into xenstored > * split dependencies in smaller patches > > Vincent Hanquez (10): > add ocaml mmap bindings implementation. > add ocaml XC bindings. > add XS ocaml bindings. > add uuid ocaml bindings > add logs ocaml bindings > add ocaml xenstored > add compilation makefile to ocaml directory > remove hook from external ocaml repository > add ocaml tools to build if defined. default to n > default ocaml tools config variable to y > > Config.mk | 15 +- > tools/Makefile | 23 +- > tools/ocaml/Makefile | 36 + > tools/ocaml/Makefile.rules | 93 ++ > tools/ocaml/common.make | 28 + > tools/ocaml/libs/eventchn/META.in | 4 + > tools/ocaml/libs/eventchn/Makefile | 28 + > tools/ocaml/libs/eventchn/eventchn.ml | 27 + > tools/ocaml/libs/eventchn/eventchn.mli | 26 + > tools/ocaml/libs/eventchn/eventchn_stubs.c | 173 ++++ > tools/ocaml/libs/log/META.in | 4 + > tools/ocaml/libs/log/Makefile | 41 + > tools/ocaml/libs/log/log.ml | 258 +++++ > tools/ocaml/libs/log/log.mli | 55 + > tools/ocaml/libs/log/logs.ml | 197 ++++ > tools/ocaml/libs/log/logs.mli | 46 + > tools/ocaml/libs/log/syslog.ml | 26 + > tools/ocaml/libs/log/syslog.mli | 41 + > tools/ocaml/libs/log/syslog_stubs.c | 73 ++ > tools/ocaml/libs/mmap/META.in | 4 + > tools/ocaml/libs/mmap/Makefile | 27 + > tools/ocaml/libs/mmap/mmap.ml | 31 + > tools/ocaml/libs/mmap/mmap.mli | 28 + > tools/ocaml/libs/mmap/mmap_stubs.c | 136 +++ > tools/ocaml/libs/mmap/mmap_stubs.h | 33 + > tools/ocaml/libs/uuid/META.in | 4 + > tools/ocaml/libs/uuid/Makefile | 26 + > tools/ocaml/libs/uuid/uuid.ml | 88 ++ > tools/ocaml/libs/uuid/uuid.mli | 53 + > tools/ocaml/libs/xb/META.in | 4 + > tools/ocaml/libs/xb/Makefile | 41 + > tools/ocaml/libs/xb/op.ml | 84 ++ > tools/ocaml/libs/xb/packet.ml | 50 + > tools/ocaml/libs/xb/partial.ml | 44 + > tools/ocaml/libs/xb/xb.ml | 189 ++++ > tools/ocaml/libs/xb/xb.mli | 83 ++ > tools/ocaml/libs/xb/xb_stubs.c | 74 ++ > tools/ocaml/libs/xb/xs_ring.ml | 18 + > tools/ocaml/libs/xb/xs_ring_stubs.c | 117 +++ > tools/ocaml/libs/xc/META.in | 4 + > tools/ocaml/libs/xc/Makefile | 28 + > tools/ocaml/libs/xc/xc.h | 191 ++++ > tools/ocaml/libs/xc/xc.ml | 340 +++++++ > tools/ocaml/libs/xc/xc.mli | 196 ++++ > tools/ocaml/libs/xc/xc_cpufeature.h | 116 +++ > tools/ocaml/libs/xc/xc_cpuid.h | 285 ++++++ > tools/ocaml/libs/xc/xc_e820.h | 20 + > tools/ocaml/libs/xc/xc_lib.c | 1502 ++++++++++++++++++++++++++++ > tools/ocaml/libs/xc/xc_stubs.c | 1170 ++++++++++++++++++++++ > tools/ocaml/libs/xs/META.in | 4 + > tools/ocaml/libs/xs/Makefile | 42 + > tools/ocaml/libs/xs/queueop.ml | 73 ++ > tools/ocaml/libs/xs/xs.ml | 170 ++++ > tools/ocaml/libs/xs/xs.mli | 90 ++ > tools/ocaml/libs/xs/xsraw.ml | 265 +++++ > tools/ocaml/libs/xs/xsraw.mli | 60 ++ > tools/ocaml/libs/xs/xst.ml | 61 ++ > tools/ocaml/libs/xs/xst.mli | 30 + > tools/ocaml/xenstored/Makefile | 54 + > tools/ocaml/xenstored/config.ml | 112 ++ > tools/ocaml/xenstored/connection.ml | 234 +++++ > tools/ocaml/xenstored/connections.ml | 167 +++ > tools/ocaml/xenstored/define.ml | 40 + > tools/ocaml/xenstored/disk.ml | 157 +++ > tools/ocaml/xenstored/domain.ml | 62 ++ > tools/ocaml/xenstored/domains.ml | 84 ++ > tools/ocaml/xenstored/event.ml | 29 + > tools/ocaml/xenstored/logging.ml | 239 +++++ > tools/ocaml/xenstored/parse_arg.ml | 68 ++ > tools/ocaml/xenstored/perms.ml | 167 +++ > tools/ocaml/xenstored/process.ml | 396 ++++++++ > tools/ocaml/xenstored/quota.ml | 83 ++ > tools/ocaml/xenstored/store.ml | 461 +++++++++ > tools/ocaml/xenstored/symbol.ml | 76 ++ > tools/ocaml/xenstored/symbol.mli | 52 + > tools/ocaml/xenstored/transaction.ml | 198 ++++ > tools/ocaml/xenstored/utils.ml | 107 ++ > tools/ocaml/xenstored/xenstored.conf | 30 + > tools/ocaml/xenstored/xenstored.ml | 404 ++++++++ > tools/xenstore/Makefile | 5 - > 80 files changed, 10168 insertions(+), 32 deletions(-) > create mode 100644 tools/ocaml/Makefile > create mode 100644 tools/ocaml/Makefile.rules > create mode 100644 tools/ocaml/common.make > create mode 100644 tools/ocaml/libs/eventchn/META.in > create mode 100644 tools/ocaml/libs/eventchn/Makefile > create mode 100644 tools/ocaml/libs/eventchn/eventchn.ml > create mode 100644 tools/ocaml/libs/eventchn/eventchn.mli > create mode 100644 tools/ocaml/libs/eventchn/eventchn_stubs.c > create mode 100644 tools/ocaml/libs/log/META.in > create mode 100644 tools/ocaml/libs/log/Makefile > create mode 100644 tools/ocaml/libs/log/log.ml > create mode 100644 tools/ocaml/libs/log/log.mli > create mode 100644 tools/ocaml/libs/log/logs.ml > create mode 100644 tools/ocaml/libs/log/logs.mli > create mode 100644 tools/ocaml/libs/log/syslog.ml > create mode 100644 tools/ocaml/libs/log/syslog.mli > create mode 100644 tools/ocaml/libs/log/syslog_stubs.c > create mode 100644 tools/ocaml/libs/mmap/META.in > create mode 100644 tools/ocaml/libs/mmap/Makefile > create mode 100644 tools/ocaml/libs/mmap/mmap.ml > create mode 100644 tools/ocaml/libs/mmap/mmap.mli > create mode 100644 tools/ocaml/libs/mmap/mmap_stubs.c > create mode 100644 tools/ocaml/libs/mmap/mmap_stubs.h > create mode 100644 tools/ocaml/libs/uuid/META.in > create mode 100644 tools/ocaml/libs/uuid/Makefile > create mode 100644 tools/ocaml/libs/uuid/uuid.ml > create mode 100644 tools/ocaml/libs/uuid/uuid.mli > create mode 100644 tools/ocaml/libs/xb/META.in > create mode 100644 tools/ocaml/libs/xb/Makefile > create mode 100644 tools/ocaml/libs/xb/op.ml > create mode 100644 tools/ocaml/libs/xb/packet.ml > create mode 100644 tools/ocaml/libs/xb/partial.ml > create mode 100644 tools/ocaml/libs/xb/xb.ml > create mode 100644 tools/ocaml/libs/xb/xb.mli > create mode 100644 tools/ocaml/libs/xb/xb_stubs.c > create mode 100644 tools/ocaml/libs/xb/xs_ring.ml > create mode 100644 tools/ocaml/libs/xb/xs_ring_stubs.c > create mode 100644 tools/ocaml/libs/xc/META.in > create mode 100644 tools/ocaml/libs/xc/Makefile > create mode 100644 tools/ocaml/libs/xc/xc.h > create mode 100644 tools/ocaml/libs/xc/xc.ml > create mode 100644 tools/ocaml/libs/xc/xc.mli > create mode 100644 tools/ocaml/libs/xc/xc_cpufeature.h > create mode 100644 tools/ocaml/libs/xc/xc_cpuid.h > create mode 100644 tools/ocaml/libs/xc/xc_e820.h > create mode 100644 tools/ocaml/libs/xc/xc_lib.c > create mode 100644 tools/ocaml/libs/xc/xc_stubs.c > create mode 100644 tools/ocaml/libs/xs/META.in > create mode 100644 tools/ocaml/libs/xs/Makefile > create mode 100644 tools/ocaml/libs/xs/queueop.ml > create mode 100644 tools/ocaml/libs/xs/xs.ml > create mode 100644 tools/ocaml/libs/xs/xs.mli > create mode 100644 tools/ocaml/libs/xs/xsraw.ml > create mode 100644 tools/ocaml/libs/xs/xsraw.mli > create mode 100644 tools/ocaml/libs/xs/xst.ml > create mode 100644 tools/ocaml/libs/xs/xst.mli > create mode 100644 tools/ocaml/xenstored/Makefile > create mode 100644 tools/ocaml/xenstored/config.ml > create mode 100644 tools/ocaml/xenstored/connection.ml > create mode 100644 tools/ocaml/xenstored/connections.ml > create mode 100644 tools/ocaml/xenstored/define.ml > create mode 100644 tools/ocaml/xenstored/disk.ml > create mode 100644 tools/ocaml/xenstored/domain.ml > create mode 100644 tools/ocaml/xenstored/domains.ml > create mode 100644 tools/ocaml/xenstored/event.ml > create mode 100644 tools/ocaml/xenstored/logging.ml > create mode 100644 tools/ocaml/xenstored/parse_arg.ml > create mode 100644 tools/ocaml/xenstored/perms.ml > create mode 100644 tools/ocaml/xenstored/process.ml > create mode 100644 tools/ocaml/xenstored/quota.ml > create mode 100644 tools/ocaml/xenstored/store.ml > create mode 100644 tools/ocaml/xenstored/symbol.ml > create mode 100644 tools/ocaml/xenstored/symbol.mli > create mode 100644 tools/ocaml/xenstored/transaction.ml > create mode 100644 tools/ocaml/xenstored/utils.ml > create mode 100644 tools/ocaml/xenstored/xenstored.conf > create mode 100644 tools/ocaml/xenstored/xenstored.ml > > > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xensource.com > http://lists.xensource.com/xen-devel > >_______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Vincent Hanquez
2010-Apr-23 21:35 UTC
Re: [Xen-devel] [PATCH 00/10][RFC][v2] merge ocaml xenstored and dependencies
On 23/04/10 17:04, Dulloor wrote:> If there are any features and/or additions to XenStore protocol in the > Ocaml version, is there a plan to do it in the C version too ?there''s currently no such plan. the Xenstore protocol remains unchanged though. -- Vincent _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Dulloor
2010-Apr-23 23:18 UTC
Re: [Xen-devel] [PATCH 00/10][RFC][v2] merge ocaml xenstored and dependencies
On Fri, Apr 23, 2010 at 5:35 PM, Vincent Hanquez <vincent.hanquez@eu.citrix.com> wrote:> On 23/04/10 17:04, Dulloor wrote: >> >> If there are any features and/or additions to XenStore protocol in the >> Ocaml version, is there a plan to do it in the C version too ? > > there''s currently no such plan. > > the Xenstore protocol remains unchanged though. > > -- > Vincent >Then, how/why do we plan to support two implementations of the same stack. For instance, with xl, I guess people are hoping to do away with python-stuff at some point. -dulloor _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Vincent Hanquez
2010-Apr-24 13:06 UTC
Re: [Xen-devel] [PATCH 00/10][RFC][v2] merge ocaml xenstored and dependencies
On Sat, Apr 24, 2010 at 12:18:17AM +0100, Dulloor wrote:> Then, how/why do we plan to support two implementations of the same > stack. For instance, with xl, I guess people are hoping to do away > with python-stuff at some point.The plan is to all migrate to the OCaml version. I was rather careful on providing oxenstored in parallel for now, since this is quite likely that it''s not as portable as the C one yet; but ultimately, we should be able to remove the C version completely. -- Vincent _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel