Subject: Re: xen-3.1.0 and dom0 problems with /dev/ksyms
To: Juraj Hercek <nbsd@hck.sk>
From: Christoph Egger <Christoph_Egger@gmx.de>
List: port-xen
Date: 07/16/2007 15:50:26
On Monday 16 July 2007 14:46:27 Juraj Hercek wrote:
> Christoph Egger wrote:
> > On Sunday 15 July 2007 15:52:46 Juraj Hercek wrote:
> >> Maybe the unaccessible /dev/ksyms is related to this?:
> >> $ sudo xm dmesg | tail -15
> >> (XEN) Scrubbing Free RAM: .................done.
> >> (XEN) Xen trace buffers: disabled
> >> (XEN) Std. Loglevel: Errors and warnings
> >> (XEN) Guest Loglevel: Nothing (Rate-limited: Errors and warnings)
> >> (XEN) *** Serial input -> DOM0 (type 'CTRL-a' three times to switch
> >> input to Xen).
> >> (XEN) mm.c:503:d0 Could not get page ref for pfn bff02
> >> (XEN) mm.c:2324:d0 Could not get page for normal update
> >> (XEN) mm.c:503:d0 Could not get page ref for pfn bff02
> >> (XEN) mm.c:2324:d0 Could not get page for normal update
> >> (XEN) mm.c:503:d0 Could not get page ref for pfn bff02
> >> (XEN) mm.c:2324:d0 Could not get page for normal update
> >> (XEN) mm.c:503:d0 Could not get page ref for pfn bff02
> >> (XEN) mm.c:2324:d0 Could not get page for normal update
> >> (XEN) mm.c:503:d0 Could not get page ref for pfn bff02
> >> (XEN) mm.c:2324:d0 Could not get page for normal update
> >>
> >> Any Idea how to get rid of those "Could not get page ..." things?
> >
> > Do you see the '[ Kernel symbol table invalid! ]'  message as I do?
> >
> > <snippet>
> > (XEN) Scrubbing Free RAM 0xffc00000 ->
> > 0xdefb0000: ..............................done.
> > (XEN) Xen is relinquishing VGA console.
> > (XEN) *** Serial input -> DOM0 (type 'CTRL-a' three times to switch input
> > to Xen).
> > (XEN) Freed 116kB init memory.
> > [ Kernel symbol table invalid! ]       <----
> > Copyright (c) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
> >     2006, 2007
> >     The NetBSD Foundation, Inc.  All rights reserved.
> > Copyright (c) 1982, 1986, 1989, 1991, 1993
> >     The Regents of the University of California.  All rights reserved.
> > </snippet>
>
> No. Output is exactly as I've specified above, maybe the difference is
> in dom0 kernel - I've used custom one, not the XEN3_DOM0 one from NetBSD
> distribution (everything built from NetBSD current updated on July 1st).

I also build my own Dom0 kernel. But that doesn't matter, because this does
not change the fact that symtab is NULL in init386() in 
sys/arch/xen/i386/machdep.c, line 1982.

> > Good to know that it works with xen-3.0.3. Does it work for you, with
> > xen-3.0.4 hypervisor?
>
> Yes. xen 3.0.4 (xen-3.0.4-1.gz - downloaded from
> http://bits.xensource.com/oss-xen/release/3.0.4-1/bin.tgz/xen-3.0.4_1-insta
>ll-x86_32.tgz) works fine, I opened /dev/ksyms and read symbols.
>
> > I think, the libelf work done in the hypervisor by linux distributors
> > broke bsd. BSD_SYMTAB is no longer handled correctly.
> > The elf_load_binary() function in xen/common/libelf/libelf-loader.c in
> > the hypervisor is the responsible one which loads the Dom0 image.
>
> I see, hopefully the fix will be included in next xen hypervisor release.

Well, first write one. The xen patch may not break Linux to get accepted.
But xen patches may break BSD to get accepted... somewhat unfair IMO :-(

Christoph