NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: port-xen/37761: recent xen3/i386 domu kernel doesn't boot



The following reply was made to PR port-xen/37761; it has been noted by GNATS.

From: Manuel Bouyer <bouyer%antioche.eu.org@localhost>
To: gnats-bugs%NetBSD.org@localhost
Cc: port-xen-maintainer%NetBSD.org@localhost, gnats-admin%NetBSD.org@localhost,
        netbsd-bugs%NetBSD.org@localhost
Subject: Re: port-xen/37761: recent xen3/i386 domu kernel doesn't boot
Date: Tue, 15 Jan 2008 17:14:51 +0100

 --tKW2IUtsqtDRztdT
 Content-Type: text/plain; charset=us-ascii
 Content-Disposition: inline
 
 On Tue, Jan 15, 2008 at 11:45:00AM +0000, yamt%mwd.biglobe.ne.jp@localhost 
wrote:
 > >Description:
 > 
 >      a recent kernel doesn't boot.
 > 
 >      % sudo xm create -c kernel=./20080113 /etc/xen/nbsd
 >      Using config file "/etc/xen/nbsd".
 >      Started domain nbsd
 >      xenconsole: Could not read tty from store: No such file or directory
 >      %
 >      
 >      an old kernel with the same kernel config works fine.
 > 
 >      i've put some files at ftp://ftp.netbsd.org/pub/NetBSD/misc/yamt/6/.
 >              20080112.gz     working kernel (gzipped)
 >              20080113.gz     not working kernel (gzipped)
 >              nbsd            /etc/xen/nbsd (see above)
 >              XENU            a kernel config
 >              XENU.base       a file included by XENU
 > 
 
 The attached patch should fix it (it does for me). The issue was that your
 kernel is smaller than XEN3_DOMU, and needs one less L2 slot. Then
 pmap_bootstrap()/initi386() falls in this empty slot when it wants to map a
 few things (e.g. idt_vaddr) before calling pmap_growkernel().
 
 I can't commit it right now, I'll do in a few hours.
 
 -- 
 Manuel Bouyer, LIP6, Universite Paris VI.           
Manuel.Bouyer%lip6.fr@localhost
      NetBSD: 26 ans d'experience feront toujours la difference
 --
 
 --tKW2IUtsqtDRztdT
 Content-Type: text/plain; charset=us-ascii
 Content-Disposition: attachment; filename=diff
 
 Index: xen/x86/x86_xpmap.c
 ===================================================================
 RCS file: /cvsroot/src/sys/arch/xen/x86/x86_xpmap.c,v
 retrieving revision 1.4
 diff -u -r1.4 x86_xpmap.c
 --- xen/x86/x86_xpmap.c        11 Jan 2008 20:00:52 -0000      1.4
 +++ xen/x86/x86_xpmap.c        15 Jan 2008 16:09:39 -0000
 @@ -161,8 +162,8 @@
        for (va = base; va < end; va += PAGE_SIZE) {
                KASSERT(va >= VM_MIN_KERNEL_ADDRESS);
                ptp = kvtopte(va);
 -              XENPRINTF(("xen_set_ldt %p %d %p %p\n", (void *)base,
 -                            entries, ptp, maptp));
 +              XENPRINTF(("xen_set_ldt %p %d %p\n", (void *)base,
 +                            entries, ptp));
                pmap_pte_clearbits(ptp, PG_RW);
        }
        s = splvm();
 @@ -553,6 +554,13 @@
                count++;
        }
  #ifndef __x86_64__
 +      /*
 +       * one more L2 page: we'll alocate several pages after kva_start
 +       * in pmap_bootstrap() before pmap_growkernel(), which have not been
 +       * counted here. It's not a big issue to allocate one more L2 as
 +       * pmap_growkernel() will be called anyway.
 +       */
 +      count++;
        nkptp[1] = count;
  #endif
  
 
 --tKW2IUtsqtDRztdT--
 



Home | Main Index | Thread Index | Old Index