Hello, I am trying to compile the mini-os under xen2 I am getting lot''s of errors and I guess mini-os was written for a much earlier version of xen. Is there an updated version of mini-os somewhere ? Do you stop supporting mini-os ? Rick ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click _______________________________________________ Xen-devel mailing list Xen-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/xen-devel
Hi,
I am trying to get a program to load and run directly on XEN. I''ve
been looking at mini-os but I have not been able to compile it.
Anyhow, right now I am just trying to get a program to load and print
"Hello World". So I''ve modified mini-os and removed
everything from
the compilation except for the files head.S and the function
start_kernel() in kernel.c.
my start_kernel() function looks like this:
==========================================================void
start_kernel(start_info_t *si)
{
HYPERVISOR_console_io (CONSOLEIO_write, 11, "Hello World");
HYPERVISOR_shutdown();
}
==========================================================
my head.S file looks like this:
==========================================================#include <os.h>
.globl _start, shared_info
_start:
cld
lss stack_start,%esp
push $shared_info
call start_kernel
stack_start:
.long stack_start+8192, __KERNEL_DS
/* Unpleasant -- the PTE that maps this page is actually overwritten */
/* to map the real shared-info page! :-) */
.org 0x1000
shared_info:
.org 0x2000
==========================================================
In head.S I changed
================================stack_start:
.long stack+8192, __KERNEL_DS
================================to
================================stack_start:
.long stack_start+8192, __KERNEL_DS
================================because there were no symbols called
"stack"
When I try to load this program with XEN using "xm create" I get the
following error:
Error: Error creating domain: (0, ''Error'')
Is there something wrong with the Makefile and linking process that
comes with mini-os ?
Any help will be much appreciated.
Thanks
Rick
On Fri, 11 Feb 2005 18:56:19 -0500, Rick <judicator3@gmail.com>
wrote:> Hello,
>
> I am trying to compile the mini-os under xen2
> I am getting lot''s of errors and I guess mini-os was written for a
> much earlier version of xen. Is there an updated version of mini-os
> somewhere ? Do you stop supporting mini-os ?
>
> Rick
>
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/xen-devel
xm gives the world''s most unhelpful error messages. You may well find a more useful message hidden away in /var/log/xend[-debug].log as comes straight from the domain builder in libxc. My guess woul dbe that you do not have a ''__xen_guest'' section in your Elf image. Look at the top of linux-2.6.10-xen-sparse/arch/xen/i386/kernel/head.S for an example of how to specify one. -- Keir> Hi, > > I am trying to get a program to load and run directly on XEN. I''ve > been looking at mini-os but I have not been able to compile it. > Anyhow, right now I am just trying to get a program to load and print > "Hello World". So I''ve modified mini-os and removed everything from > the compilation except for the files head.S and the function > start_kernel() in kernel.c. > > my start_kernel() function looks like this: > ==========================================================> void start_kernel(start_info_t *si) > { > > HYPERVISOR_console_io (CONSOLEIO_write, 11, "Hello World"); > HYPERVISOR_shutdown(); > } > ==========================================================> > my head.S file looks like this: > ==========================================================> #include <os.h> > > .globl _start, shared_info > > _start: > cld > lss stack_start,%esp > push $shared_info > call start_kernel > > stack_start: > .long stack_start+8192, __KERNEL_DS > > /* Unpleasant -- the PTE that maps this page is actually overwritten */ > /* to map the real shared-info page! :-) */ > .org 0x1000 > shared_info: > .org 0x2000 > ==========================================================> > In head.S I changed > > ================================> stack_start: > .long stack+8192, __KERNEL_DS > ================================> to > ================================> stack_start: > .long stack_start+8192, __KERNEL_DS > ================================> because there were no symbols called "stack" > > When I try to load this program with XEN using "xm create" I get the > following error: > > Error: Error creating domain: (0, ''Error'') > > Is there something wrong with the Makefile and linking process that > comes with mini-os ? > > Any help will be much appreciated. > > Thanks > Rick > > > > > > On Fri, 11 Feb 2005 18:56:19 -0500, Rick <judicator3@gmail.com> wrote: > > Hello, > > > > I am trying to compile the mini-os under xen2 > > I am getting lot''s of errors and I guess mini-os was written for a > > much earlier version of xen. Is there an updated version of mini-os > > somewhere ? Do you stop supporting mini-os ? > > > > Rick > > > > > ------------------------------------------------------- > SF email is sponsored by - The IT Product Guide > Read honest & candid reviews on hundreds of IT Products from real users. > Discover which products truly live up to the hype. Start reading now. > http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/xen-devel >------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click _______________________________________________ Xen-devel mailing list Xen-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/xen-devel
Keir Fraser wrote:> xm gives the world''s most unhelpful error messages. You may well find > a more useful message hidden away in /var/log/xend[-debug].log as > comes straight from the domain builder in libxc. > > My guess woul dbe that you do not have a ''__xen_guest'' section in your > Elf image. Look at the top of > linux-2.6.10-xen-sparse/arch/xen/i386/kernel/head.S for an example of > how to specify one. >The new vm-tools that were just announced will probably be easier to use for this kind of debugging than xn/xend. Also, I used to re-create the HYPERVISOR_console_write syscall, and configure Xen to allow unpriv domains to write to the serial console. I think the new HYPERVISOR_console_io syscall can be convinced to do the same thing. In my xen tarball at http://www.diku.dk/~jacobg/self-migration/ you can find the source of ''mstrap'' which is very much like mini-os, but perhaps a little more up to date. The network driver is not working in Xen2, but the elf-image should at least load using the recent tools. Jacob ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click _______________________________________________ Xen-devel mailing list Xen-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/xen-devel
Hi Keir,
You were right, I was missing the section __xen_guest.
So now when I create the domain I do not get any error message and I
do get a console.
So the 1st thing I am doing is just trying to write something on the
console with the hypervisor call "console_io". However, I do not see
anything on the console. In order to use the hypervisor calls, do I
have to first set up the trap tables, page tables and parse the shared
struct info etc ... ? Also, is it important where I load the image ?
Right now my lds script specifies "0xC0000000" as the starting
address. I also tried "0xC0000000 + 0x100000" which I saw in the linux
lds script.
My head.S file is very simple and I invoke the hypervisor calls by
issuing the interrupts directly:
#define ENTRY(X) .globl X ; X :
.section __xen_guest
.ascii"GUEST_OS=linux,GUEST_VER=2.6,XEN_VER=2.0,VIRT_BASE=0xC0000000"
.ascii ",LOADER=generic"
.ascii ",PT_MODE_WRITABLE"
.byte 0
.text
/*
* References to members of the new_cpu_data structure.
*/
.globl _start
_start:
cld
movl $18,%eax # __HYPERVISOR_console_io
movl $0, %ebx # arg1 = 0 for write
movl $hello_message_len,%ecx # arg2 = buffer length
movl $hello_message,%edx # arg3 = buffer virtual address
int $0x82
movl $6,%eax # __HYPERVISOR_sched_op
movl $2,%ebx # shutdown
int $0x82
hang: jmp hang # shouldn''t get here
hello_message: .ascii "This is the hello world program\n"
hello_message_len = . - hello_message
Thanks
Richard
On Sat, 12 Feb 2005 18:39:07 -0800, Jacob Gorm Hansen <jacobg@diku.dk>
wrote:> Keir Fraser wrote:
> > xm gives the world''s most unhelpful error messages. You may
well find
> > a more useful message hidden away in /var/log/xend[-debug].log as
> > comes straight from the domain builder in libxc.
> >
> > My guess woul dbe that you do not have a
''__xen_guest'' section in your
> > Elf image. Look at the top of
> > linux-2.6.10-xen-sparse/arch/xen/i386/kernel/head.S for an example of
> > how to specify one.
> >
>
> The new vm-tools that were just announced will probably be easier to use
> for this kind of debugging than xn/xend. Also, I used to re-create the
> HYPERVISOR_console_write syscall, and configure Xen to allow unpriv
> domains to write to the serial console. I think the new
> HYPERVISOR_console_io syscall can be convinced to do the same thing.
>
> In my xen tarball at http://www.diku.dk/~jacobg/self-migration/ you can
> find the source of ''mstrap'' which is very much like
mini-os, but perhaps
> a little more up to date. The network driver is not working in Xen2, but
> the elf-image should at least load using the recent tools.
>
> Jacob
>
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/xen-devel
> You were right, I was missing the section __xen_guest. > So now when I create the domain I do not get any error message and I > do get a console. > So the 1st thing I am doing is just trying to write something on the > console with the hypervisor call "console_io". However, I do not see > anything on the console.You need to be using a debug=y build of Xen to use console_io from an unprivileged domain. Ian ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_ide95&alloc_id396&op=click _______________________________________________ Xen-devel mailing list Xen-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/xen-devel
Hi Ian, Thanks for the info. I recompiled XEN with "make debug=y". I also tried by changing the xen/Rules.mk file and put "degug ?= y". Now I am stuck in the boot process. I see XEN starting to load, but then it stops and does not want to boot into domain0. My domain0 is based on a Fedora Core 3 installation During the boot process XEN stops at the following line: ================================================... ... (XEN) .... System Time : 10640414ns (XEN) .... Cpu_freq : 00000000:B2BB4F10 (XEN) .... Scale : 00000001:557D8C01 (XEN) .... Wallclock : 1108330382s 160000us --- It hangs here --- ================================================ Thanks Rick On Mon, 14 Feb 2005 01:50:11 -0000, Ian Pratt <m+Ian.Pratt@cl.cam.ac.uk> wrote:> > > You were right, I was missing the section __xen_guest. > > So now when I create the domain I do not get any error message and I > > do get a console. > > So the 1st thing I am doing is just trying to write something on the > > console with the hypervisor call "console_io". However, I do not see > > anything on the console. > > You need to be using a debug=y build of Xen to use console_io from an > unprivileged domain. > > Ian >------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click _______________________________________________ Xen-devel mailing list Xen-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/xen-devel
> > You need to be using a debug=y build of Xen to use console_io from an > > unprivileged domain. > > > > IanHello, I was having some problems to boot XEN when it was compiled with ''debug=y''. But I was able to slove that. I just had to remove some of the extra messages that get printed during the boot process when ''debug=y'' is turned on and that seemed to solve the problem. However, I still cannot get my mini-os to print something to the console. I modified the function "do_console_io()" in the file xen/drivers/char/console.c to catch whenever the mini-os tries to write to the console. "do_console_io()" is being invoked correctly and the check that (current->id == 0 ) is NOT being performed since I compiled with "debug=y". So everything should be fine and the unprivileged mini-os should be able to write to the console. But in the function call "serial_puts(sercon_handle, kbuf)", sercon_handle is -1. So the serial_puts() function is not being executed correctly. Are there some initial setup I need to do in my mini-os in order to use the console_io hypercalls. Thanks Rick ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click _______________________________________________ Xen-devel mailing list Xen-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/xen-devel