WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] caml stubdom crashes

To: Patrick Colp <pjcolp@xxxxxxxxx>
Subject: Re: [Xen-devel] caml stubdom crashes
From: Alex Zeffertt <alex.zeffertt@xxxxxxxxxxxxx>
Date: Fri, 03 Apr 2009 09:31:01 +0100
Cc: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>, "George S. Coker, II \(ncsc\)" <gscoker@xxxxxxxxxxxxxx>, Samuel Thibault <samuel.thibault@xxxxxxxxxxxxx>
Delivery-date: Fri, 03 Apr 2009 01:31:28 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <49D4E640.6080603@xxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <49D4CDEA.4060308@xxxxxxxxxxxxx> <49D4E640.6080603@xxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Thunderbird 2.0.0.19 (X11/20090105)
Patrick Colp wrote:
Alex Zeffertt wrote:
I suspect the problem is that the caml-stubdom target in stubdom/caml/Makefile compiles stubdom/caml/hello.ml and links it with $(CAMLLIB)/libasmrun.a. But this is a library compiled for the development machine platform (linux-i386-glibc) not for the stubdomain platform (minios-i386-newlib).

Maybe the original hello.ml only worked through luck, and the fact that it used so very little of the ocaml language.

What environment did you use to compile the stubdom? I tried using Ubuntu with George Coker's patch and got the same result as you (page faulting). Interestingly, I could use a %s and a string and that seems to work OK, but not %d with an int.

When I instead used Debian to compile the stubdom (which requires no patch), then I could compile and run your code just fine (no page faults). Maybe this is the problem you're having?



That's interesting, thanks! I am using Ubuntu intrepid with ocaml version 3.10.2-3ubuntu1.

I don't really like the idea of requiring a Debian build environment as a solution. It suggests a dependency on something we really don't understand. Wouldn't it be better to rebuild ocaml under stubdom/ like we do for newlib and lwip, and the be sure we'll get the same results whatever the build machine?


In order to run a non trivial ocaml application in a stubdomain (e.g. ocaml xenstored) do I need to port ocaml to minios-i386-newlib?

No, it should be possible as is. In fact, I've gotten my OCaml XenStore to run in a caml-stubdom (compiled in a Debian domain).

I'll soon be releasing a patch against the recently released disaggregated C xenstored stuff that uses my OCaml XenStore in a caml-stubdom instead.



Ah, it looks like we've been duplicating the work.  I've been working on getting
http://xenbits.xensource.com/ext/xen-ocaml-tools.hg integrated into xen-unstable.hg. The idea is that by default "make dist" builds the in-tree xenstored (as both a dom0 daemon and as a stubdom), but by uncommenting a line in Config.mk it will download xen-ocaml-tools.hg and build that instead (as both a dom0 daemon and as a stubdom). The choice of whether to run it as a dom0 daemon or as a stubdom is made post-install.

This system allows you to override the url used to get the "remote" xenstored. The build system does something similar for qemu already.

I'll send you my patches offline.

Patrick


Regards,

Alex

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>