Subject: Re: xen-3.1.0 and dom0 problems with /dev/ksyms
To: None <port-xen@netbsd.org>
From: Christoph Egger <Christoph_Egger@gmx.de>
List: port-xen
Date: 07/16/2007 08:47:09
On Sunday 15 July 2007 15:52:46 Juraj Hercek wrote:
> Hello,
>
> I've got trouble with netstat on dom0 booted by xen-3.1.0 hypervisor.
> Symptoms:
>
> $ netstat -ni
> Name Mtu Network Address Ipkts Ierrs Opkts
> Oerrs Colls
> netstat: kvm_read: Bad address
>
> The same thing works fine with xen-3.0.3 hypervisor. I've done traces of
> the 'netstat -ni' when running both hypervisors, and it seems that dom0
> running on 3.1.0 has troubles accessing /dev/ksyms - instead it directly
> opens /netbsd and takes what's necessary from there:
>
> 1 netstat CALL open(0xbbbc8667,0,0)
> 1 netstat NAMI "/dev/ksyms"
> 1 netstat RET open -1 errno 6 Device not configured
> 1 netstat CALL open(0xbbbc86f1,0,0)
> 1 netstat NAMI "/netbsd"
> 1 netstat RET open 6
>
> On the other hand, the 3.0.3 hypervisor worked fine:
>
> 1 netstat CALL open(0xbbbc8667,0,0)
> 1 netstat NAMI "/dev/ksyms"
> 1 netstat RET open 6
>
> Since I boot using grub (and I have kernels on different partition), I
> didn't care about upgrading /netbsd on netbsd partition - the running
> kernel was different from /netbsd (which was a GENERIC one). This caused
> the "netsat kvm_read: Bad address", which can be cured by properly
> synchronizing /netbsd with really booted kernel.
>
> Question, however, is, how to get /dev/ksyms working with xen 3.1.0
> hypervisor?
>
> 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>
Good to know that it works with xen-3.0.3. Does it work for you, with
xen-3.0.4 hypervisor?
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.
Christoph