Subject: Re: x86 changes
To: Manuel Bouyer <bouyer@antioche.eu.org>
From: Andrew Doran <ad@NetBSD.org>
List: port-xen
Date: 09/26/2007 20:36:55
On Sun, Sep 23, 2007 at 01:36:29PM +0200, Manuel Bouyer wrote:
> On Thu, Sep 20, 2007 at 11:41:46PM +0100, Andrew Doran wrote:
> > Hi,
> >
> > I just realised that I am not subscribed to this list.. Is anyone willing to
> > try a Xen kernel with this patch?
> >
> > http://www.netbsd.org/~ad/x86.diff
> >
> > Among other things, it:
> >
> > - makes the i386 kernel compile with pcc (well almost, a number of files
> > are problematic)
> > - reduces amd64 GENERIC.MP kernel by ~130kb, similar for the others I guess
> > - makes x86 bus_space and bus_dma more LKM friendly
> > - shares a few more files between the x86 ports
>
> there is a missing
> #include "opt_xen.h" in i386/cpufunc.S
> without it the kenrel doesn't build
>
> A XEN3_DOM0 kernel fails with:
> Loaded initial symtab at 0xc09875e0, strtab at 0xc09ea82c, # entries 23879
> panic: kernel diagnostic assertion "doing_shutdown || curlwp != NULL || (map->flags & VM_MAP_INTRSAFE)" failed: file "/dsk/l1/misc/bouyer/current/src/sys/uvm/uvm_map.c", line 1078
> Stopped at netbsd:breakpoint+0x1: ret
It looks like curlwp was not set in cpu_info_primary; another problem was
that curlwp was not being set in cpu_switchto(). I've fixed both of these.
Thanks,
Andrew