Subject: Re: Dom0 build broken
To: Andrew Doran <ad@netbsd.org>
From: Christoph Egger <Christoph_Egger@gmx.de>
List: port-xen
Date: 09/03/2007 11:45:34
On Friday 31 August 2007 19:15:26 Christoph Egger wrote:
> On Friday 31 August 2007 17:34:08 Andrew Doran wrote:
> > Hi Christoph,
> >
> > On Fri, Aug 31, 2007 at 11:19:26AM +0200, Christoph Egger wrote:
> > > Your last vmlocking merge in -current broke Xen Dom0 build:
> > > Xen DomU still builds.
> > >
> > >
> > > cc1: warnings being treated as errors
> > > ../../../../arch/x86/x86/bus_dma.c: In function '_bus_dmamem_map':
> > > ../../../../arch/x86/x86/bus_dma.c:1053: warning: implicit declaration
> > > of function 'x86_atomic_setbits_l'
> > > ../../../../arch/x86/x86/bus_dma.c: In function '_bus_dmamem_unmap':
> > > ../../../../arch/x86/x86/bus_dma.c:1098: warning: implicit declaration
> > > of function 'x86_atomic_clearbits_l'
> > > *** [bus_dma.o] Error code 1
> > > 1 error
> >
> > Odd. Do you have local modifications, and is your tree up to date? It
> > builds for me and my source tree has no diffs.

My XEN3_DOM0 has a local modification:


Index: ../i386/conf/XEN3_DOM0
===================================================================
RCS file: /cvsroot/src/sys/arch/i386/conf/XEN3_DOM0,v
retrieving revision 1.6
diff -u -p -r1.6 XEN3_DOM0
--- ../i386/conf/XEN3_DOM0      17 Oct 2006 19:57:24 -0000      1.6
+++ ../i386/conf/XEN3_DOM0      3 Sep 2007 09:42:23 -0000
@@ -23,6 +23,10 @@ options      ACPIVERBOSE
 #options        PCI_BUS_FIXUP          # fixup PCI bus numbering
 #options        PCI_INTR_FIXUP         # fixup PCI interrupt routing
 
+options                LOCKDEBUG
+options                VNODE_LOCKDEBUG
+options                MALLOC_DEBUG
+options                UVMHIST
 ioapic*                at mainbus? apid ?
 
 # ACPI devices


> > Andrew
>
> The attached patch makes this one file build again. But there is more to do
> to make the dom0 kernel build again.

The arch/xen/i386/pmap.c does not build, because pvh_lock is now a kmutex_t
but simple_lock() expects a volatile struct simplelock.

This leads to warnings like these:

../../../../arch/xen/i386/pmap.c: In function 'pmap_lock_pvhs':
../../../../arch/xen/i386/pmap.c:1599: warning: passing argument 1 
of '_simple_lock' from incompatible pointer type
../../../../arch/xen/i386/pmap.c:1604: warning: passing argument 1 
of '_simple_lock' from incompatible pointer type