From owner-freebsd-xen@FreeBSD.ORG Tue Oct 19 19:18:22 2010 Return-Path: Delivered-To: freebsd-xen@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1DE321065670 for ; Tue, 19 Oct 2010 19:18:22 +0000 (UTC) (envelope-from linda.messerschmidt@gmail.com) Received: from mail-fx0-f54.google.com (mail-fx0-f54.google.com [209.85.161.54]) by mx1.freebsd.org (Postfix) with ESMTP id AA0338FC08 for ; Tue, 19 Oct 2010 19:18:21 +0000 (UTC) Received: by fxm12 with SMTP id 12so1924039fxm.13 for ; Tue, 19 Oct 2010 12:18:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:date:message-id :subject:from:to:content-type; bh=DoLFraHhhm7s611h9I7QX7F97MdWV7TlFamW3GzwP/g=; b=JcIhUEbm3iNQXFNf+1gYaiPYVhR+8bK+S2Duc5Uq2xsiZqtTMPbqLwGQS8VCSlb8Xs 4DjNLc+yafldIbo/RYAJCqvO5f1qDn8e+o06+M5HZs8Arky4A0DVjavnixTFW/UNZzC2 PVHTU6h2vn9jpb1zY8uAgaa2gRsXv6H3QAL3I= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=rXt1+jsdGjfOnlEIX+IOdD2RwvIgfGIJxWtGW+Zb3M34LpP+2s1qJ6TeimfikqcFFY e2Lk3ljuZ4sdsWKtb23CpfPHLGFTKZLFYjwzJmy3FrUuk9VhUWGjfbS27xdIXXeX0Bbq JYy4s2NkFYxmO4SmJiAxxp4p2aQWeX+j9aytc= MIME-Version: 1.0 Received: by 10.204.52.208 with SMTP id j16mr5200606bkg.133.1287514276155; Tue, 19 Oct 2010 11:51:16 -0700 (PDT) Received: by 10.204.152.203 with HTTP; Tue, 19 Oct 2010 11:51:16 -0700 (PDT) Date: Tue, 19 Oct 2010 14:51:16 -0400 Message-ID: From: Linda Messerschmidt To: freebsd-xen@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 Subject: No PAE in XEN kernel causes build failure X-BeenThere: freebsd-xen@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion of the freebsd port to xen - implementation and usage List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Oct 2010 19:18:22 -0000 I'm trying to build a Xen kernel for 8.1. Mostly everything is working so far (with the exception of the known bugs), which is great. :) I cry a little bit that FreeBSD cannot be dom0, but one step at a time. :) I noticed "options PAE" in the provided example XEN kernel. I don't have a lot of experience with PAE, but I have heard it's a dirty hack for getting >4gb on i386 and that it was mostly used with XEN when i386 was the only viable dom0. We are using an amd64 Debian host and running only i386 PV guests with relatively small amounts of RAM. (<3gb). So I thought that may not be needed in our environment. Here's the config file I tried: ------------ START ---------------- include XEN ident XENEX #nooptions PAE nodevice atkbdc nodevice atkbd nodevice kbdmux nodevice psm ------------ END ----------------- With 8.1-STABLE r214066, building the above kernel succeeds. However, uncommenting the "nooptions PAE" gets the following errors: cc -c -O -pipe -std=c99 -g -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual -Wundef -Wno-pointer-sign -fformat-extensions -nostdinc -I. -I/usr/src/sys -I/usr/src/sys/contrib/altq -D_KERNEL -DHAVE_KERNEL_OPTION_HEADERS -include opt_global.h -fno-common -finline-limit=8000 --param inline-unit-growth=100 --param large-function-growth=1000 -mno-align-long-strings -mpreferred-stack-boundary=2 -mno-mmx -mno-3dnow -mno-sse -mno-sse2 -mno-sse3 -ffreestanding -fstack-protector -Werror /usr/src/sys/i386/xen/xen_machdep.c /usr/src/sys/i386/xen/xen_machdep.c: In function 'initvalues': /usr/src/sys/i386/xen/xen_machdep.c:1075: error: 'IdlePTDnew' undeclared (first use in this function) /usr/src/sys/i386/xen/xen_machdep.c:1075: error: (Each undeclared identifier is reported only once /usr/src/sys/i386/xen/xen_machdep.c:1075: error: for each function it appears in.) /usr/src/sys/i386/xen/xen_machdep.c:1080: error: 'IdlePTDnewma' undeclared (first use in this function) /usr/src/sys/i386/xen/xen_machdep.c:1083: error: 'IdlePDPTnew' undeclared (first use in this function) /usr/src/sys/i386/xen/xen_machdep.c:1122: error: 'IdlePDPT' undeclared (first use in this function) /usr/src/sys/i386/xen/xen_machdep.c:1123: error: 'IdlePDPTma' undeclared (first use in this function) /usr/src/sys/i386/xen/xen_machdep.c:1123: error: 'IdlePDPTnewma' undeclared (first use in this function) cc1: warnings being treated as errors /usr/src/sys/i386/xen/xen_machdep.c:891: warning: unused variable 'pdir_shadow_ma' *** Error code 1 I took a look at xen_machdep.c and it looks like these values are declared inside an #ifdef PAE and then defined in a later #ifdef PAE, and then referenced at the lines cited above without one. I really don't know if XEN can/should be able to be built without PAE, but I am pretty sure the above means that there's a logic flaw somewhere in the #ifdef arrangements. Unfortunately I don't know what this stuff is so I don't know if the declaration/definition should come out of the #ifdefs or if the references above should go inside one. I thought I would point it out in case there's someone reading who understands this stuff better than I do. I.e. at all. :) As an aside, I also noticed that in the XEN example config the lines "option XEN" appears whereas everything else is the usual "options WHATEVER" and I was wondering if that's significant or if it's just an equivalent alias I haven't noticed before. Thanks!