WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] mach_mpspec.h, mach_apicdef.h & xenbus_mkdir

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] mach_mpspec.h, mach_apicdef.h & xenbus_mkdir
From: "J. Aaron Pendergrass" <James.Pendergrass@xxxxxxxxxx>
Date: Fri, 18 May 2007 15:11:01 -0400
Delivery-date: Fri, 18 May 2007 12:10:05 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Hello list,
I'm trying to build a linux kernel module that uses xenstore to report
on the modules loaded into a DomU's kernel.  When building against
the current unstable (changeset 15080:089696e0c603) I'm getting build
errors about not being able to find mach_mpspec.h and mach_apicdef.h

make -C /root/xen-unstable.hg/linux-2.6.18-xen O=/root/xen- unstable.hg/build-linux-2.6.18-xen_x86_32 modules
  CC [M]  /root/lkim-old/kernel_modules/modreporter.o
In file included from include2/asm/mach-xen/asm/smp.h:17,
from /root/xen-unstable.hg/linux-2.6.18-xen/include/ linux/smp.h:18, from /root/xen-unstable.hg/linux-2.6.18-xen/include/ linux/sched.h:63, from /root/xen-unstable.hg/linux-2.6.18-xen/include/ linux/module.h:9,
                 from /root/modreporter/modreporter.c:22:
include2/asm/mpspec.h:6:25: error: mach_mpspec.h: No such file or directory
In file included from include2/asm/mach-xen/asm/smp.h:17,
from /root/xen-unstable.hg/linux-2.6.18-xen/include/ linux/smp.h:18, from /root/xen-unstable.hg/linux-2.6.18-xen/include/ linux/sched.h:63, from /root/xen-unstable.hg/linux-2.6.18-xen/include/ linux/module.h:9,
                 from /root/modreporter/modreporter.c:22:
include2/asm/mpspec.h:8: error: ‘MAX_MP_BUSSES’ undeclared here (not in a function) include2/asm/mpspec.h:22: error: ‘MAX_IRQ_SOURCES’ undeclared here (not in a function) In file included from /root/xen-unstable.hg/linux-2.6.18-xen/include/ linux/smp.h:18, from /root/xen-unstable.hg/linux-2.6.18-xen/include/ linux/sched.h:63, from /root/xen-unstable.hg/linux-2.6.18-xen/include/ linux/module.h:9,
                 from /root/modreporter/modreporter.c:22:
include2/asm/mach-xen/asm/smp.h:75:26: error: mach_apicdef.h: No such file or directory

Copying these files from mach-generic or mach-default allows the build to proceed. But on loading the module it receives an error trying to call xenbus_mkdir.

Specifically it calls:
        if((ret = xenbus_mkdir(t,"modules" , ""))){
printk(KERN_ERROR "modreporter: Error making \"modules\" directory: %d.\n", ret);
        }

It hits the error condition with error value -22 (-EINVAL).

I used xenstore's trace option, and a number of printk's in the xenbus_mkdir path and determined that the problem seems to be that xenbus_mkdir is not receiving the string "modules" as it's argument (it receives a NULL pointer which gets fed throughout the system until the xenstored in dom0 refuses
to make the NULL directory).

Are these errors related?

I've tried building the same module on a non-SMP machine with xen- unstable changeset . On this machine it doesn't hit the errors about mach_mpspec.h and mach_apicdef.h, and is able to create
the xenstore directory.

Thanks,
-aaron
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] mach_mpspec.h, mach_apicdef.h & xenbus_mkdir, J. Aaron Pendergrass <=