Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 179412 - app-emulation/xen-3.1.0 version bump
Summary: app-emulation/xen-3.1.0 version bump
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: AMD64 Linux
: High enhancement (vote)
Assignee: Gentoo Xen Devs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-05-22 11:45 UTC by gentoo
Modified: 2007-08-30 16:58 UTC (History)
19 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Ebuilds and patches for xen-3.1.0 (xen-3.1.0-ebuilds.tar.gz,8.03 KB, application/x-gzip)
2007-05-22 11:48 UTC, gentoo
Details
Patch vanilla kernel with xen (patch-2.6.18_to_xen-3.1.0.bz2,585.30 KB, application/x-gzip)
2007-05-22 19:15 UTC, slynn@granite-mtn.net
Details
updated xen ebuild (xen-3.1.0.ebuild,2.78 KB, text/plain)
2007-05-23 17:27 UTC, slynn@granite-mtn.net
Details
hvm for amd64 (xen-tools-3.1.0-r1.ebuild,5.30 KB, text/plain)
2007-05-28 12:32 UTC, Norbert Marx
Details
xen-3.1.0 build log (build.log,17.14 KB, text/plain)
2007-06-17 11:24 UTC, Erkki Eilonen
Details
Emerge info (emerge_info.log,2.10 KB, text/plain)
2007-06-17 11:24 UTC, Erkki Eilonen
Details
.config for 2.6.20, which doesn't compile on amd64 (.config,29.12 KB, text/plain)
2007-07-23 16:55 UTC, Sven
Details
.config for 2.6.20 domU kernel, which doesn't compile (.config,16.47 KB, text/plain)
2007-07-24 00:57 UTC, Sven
Details
.config for 2.6.18 domU kernel, which doesn't compile (.config,26.28 KB, text/plain)
2007-07-25 12:16 UTC, Sven
Details
Ebuild and patch for xen-sources-2.6.22 (xen-sources-2.6.22.tar.bz2,488.95 KB, application/octet-stream)
2007-08-16 10:17 UTC, Cédric Schieli
Details
app-emulation/xen-tools-3.1.0 build error log (build.log,205.42 KB, text/plain)
2007-08-17 00:31 UTC, mario
Details

Note You need to log in before you can comment on or make changes to this bug.
Description gentoo 2007-05-22 11:45:52 UTC
Xen-3.1.0 is out and compiles/runs perfectly on amd64 with a few patches. The files are ebuilds for the Xen hypevisor 3.1.0, xen-tools 3.1.0 and the 2.6.18 kernel with xen-patches.

Reproducible: Always

Steps to Reproduce:
Comment 1 gentoo 2007-05-22 11:48:38 UTC
Created attachment 119984 [details]
Ebuilds and patches for xen-3.1.0
Comment 2 slynn@granite-mtn.net 2007-05-22 18:24:18 UTC
Have you created the missing file:  patch-2.6.18_to_xen-3.1.0.bz2?

Ebuild for xen-sources is looking for it.

Seems the xen-sources ebuild structure changed significantly from <3.0.4 to 3.0.4_p1.  

Comment 3 slynn@granite-mtn.net 2007-05-22 19:13:26 UTC
Ahhh, I see where the patch-2.6.XXX_to_xen_3.Y.Z.bz2 is generated.  In xen-src there is a make mkpatches.  Ran that and then bzip2'd the file.  Attached in next post.  Need to put this in /usr/portage/distfiles.  This is in the "works on my system" status in that I can emerge  and then compile the kernel.  

Still working on several bugs in xen ebuild.

Comment 4 slynn@granite-mtn.net 2007-05-22 19:15:29 UTC
Created attachment 120022 [details]
Patch vanilla kernel with xen

this is generated via:  make mkpatches in xen-3.1.0-src and then bzip2'ing it
Comment 5 slynn@granite-mtn.net 2007-05-22 19:51:00 UTC
Running out of time right now to debug so here's where I'm at:

First, using gcc version 4.1.2 I keep seeing "gcc: unrecognized option '-nopie'".  This should be -no-pie, similar to the previous patch:  xen-3.0.2-nopiessp.patch.  Not sure that the entire previous patch is what is desired here.  

Only the file:  xen-3.1.0-src/xen/arch/x86/Rules.mk:CFLAGS += $(call cc-option,$(CC),-nopie,)

contains the bad option (that I can find.  New patch in order???

Comment 6 slynn@granite-mtn.net 2007-05-22 19:54:09 UTC
Second, I get the following when emerging xen from above ebuilds:




gcc: unrecognized option '-nopie'
ld -melf_i386 -r -o built_in.o common.o g2_on_s3.o g3_on_s3.o
make[6]: Leaving directory `/var/tmp/portage/app-emulation/xen-3.1.0/work/xen-3.1.0-src/xen/arch/x86/mm/shadow'
make -f /var/tmp/portage/app-emulation/xen-3.1.0/work/xen-3.1.0-src/xen/Rules.mk -C hap built_in.o
make[6]: Entering directory `/var/tmp/portage/app-emulation/xen-3.1.0/work/xen-3.1.0-src/xen/arch/x86/mm/hap'
make[6]: `built_in.o' is up to date.
make[6]: Leaving directory `/var/tmp/portage/app-emulation/xen-3.1.0/work/xen-3.1.0-src/xen/arch/x86/mm/hap'
ld -melf_i386 -r -o built_in.o paging.o p2m.o shadow/built_in.o hap/built_in.o
make[5]: Leaving directory `/var/tmp/portage/app-emulation/xen-3.1.0/work/xen-3.1.0-src/xen/arch/x86/mm'
make -f /var/tmp/portage/app-emulation/xen-3.1.0/work/xen-3.1.0-src/xen/Rules.mk -C oprofile built_in.o
make[5]: Entering directory `/var/tmp/portage/app-emulation/xen-3.1.0/work/xen-3.1.0-src/xen/arch/x86/oprofile'
make[5]: `built_in.o' is up to date.
make[5]: Leaving directory `/var/tmp/portage/app-emulation/xen-3.1.0/work/xen-3.1.0-src/xen/arch/x86/oprofile'
make -f /var/tmp/portage/app-emulation/xen-3.1.0/work/xen-3.1.0-src/xen/Rules.mk -C x86_32 built_in.o
make[5]: Entering directory `/var/tmp/portage/app-emulation/xen-3.1.0/work/xen-3.1.0-src/xen/arch/x86/x86_32'
make[5]: `built_in.o' is up to date.
make[5]: Leaving directory `/var/tmp/portage/app-emulation/xen-3.1.0/work/xen-3.1.0-src/xen/arch/x86/x86_32'
ld -melf_i386 -r -o built_in.o apic.o bitops.o compat.o delay.o dmi_scan.o domctl.o domain.o domain_build.o e820.o extable.o flushtlb.o platform_hypercall.o i387.o i8259.o io_apic.o irq.o microcode.o mm.o mpparse.o nmi.o numa.o physdev.o rwlock.o setup.o shutdown.o smp.o smpboot.o srat.o string.o sysctl.o time.o trampoline.o traps.o usercopy.o x86_emulate.o machine_kexec.o crash.o acpi/built_in.o cpu/built_in.o genapic/built_in.o hvm/built_in.o mm/built_in.o oprofile/built_in.o x86_32/built_in.o
make[4]: Leaving directory `/var/tmp/portage/app-emulation/xen-3.1.0/work/xen-3.1.0-src/xen/arch/x86'
make -f /var/tmp/portage/app-emulation/xen-3.1.0/work/xen-3.1.0-src/xen/Rules.mk /var/tmp/portage/app-emulation/xen-3.1.0/work/xen-3.1.0-src/xen/common/symbols-dummy.o
make[4]: Entering directory `/var/tmp/portage/app-emulation/xen-3.1.0/work/xen-3.1.0-src/xen/arch/x86'
make[4]: `/var/tmp/portage/app-emulation/xen-3.1.0/work/xen-3.1.0-src/xen/common/symbols-dummy.o' is up to date.
make[4]: Leaving directory `/var/tmp/portage/app-emulation/xen-3.1.0/work/xen-3.1.0-src/xen/arch/x86'
ld -melf_i386 -T xen.lds -N \
            boot/x86_32.o /var/tmp/portage/app-emulation/xen-3.1.0/work/xen-3.1.0-src/xen/common/built_in.o /var/tmp/portage/app-emulation/xen-3.1.0/work/xen-3.1.0-src/xen/drivers/built_in.o /var/tmp/portage/app-emulation/xen-3.1.0/work/xen-3.1.0-src/xen/arch/x86/built_in.o \
            /var/tmp/portage/app-emulation/xen-3.1.0/work/xen-3.1.0-src/xen/common/symbols-dummy.o -o /var/tmp/portage/app-emulation/xen-3.1.0/work/xen-3.1.0-src/xen/.xen-syms.0
/var/tmp/portage/app-emulation/xen-3.1.0/work/xen-3.1.0-src/xen/arch/x86/built_in.o: In function `shadow_vcpu_init':
/var/tmp/portage/app-emulation/xen-3.1.0/work/xen-3.1.0-src/xen/arch/x86/mm/shadow/common.c:67: undefined reference to `sh_paging_mode__shadow_2_guest_2'
/var/tmp/portage/app-emulation/xen-3.1.0/work/xen-3.1.0-src/xen/arch/x86/built_in.o: In function `sh_update_paging_modes':
/var/tmp/portage/app-emulation/xen-3.1.0/work/xen-3.1.0-src/xen/arch/x86/mm/shadow/common.c:2202: undefined reference to `sh_paging_mode__shadow_2_guest_2'
/var/tmp/portage/app-emulation/xen-3.1.0/work/xen-3.1.0-src/xen/arch/x86/mm/shadow/common.c:2225: undefined reference to `sh_paging_mode__shadow_2_guest_2'
/var/tmp/portage/app-emulation/xen-3.1.0/work/xen-3.1.0-src/xen/arch/x86/mm/shadow/common.c:2278: undefined reference to `sh_paging_mode__shadow_2_guest_2'
/var/tmp/portage/app-emulation/xen-3.1.0/work/xen-3.1.0-src/xen/arch/x86/built_in.o: In function `sh_remove_shadow_via_pointer':
/var/tmp/portage/app-emulation/xen-3.1.0/work/xen-3.1.0-src/xen/arch/x86/mm/shadow/common.c:1967: undefined reference to `sh_clear_shadow_entry__shadow_2_guest_2'
/var/tmp/portage/app-emulation/xen-3.1.0/work/xen-3.1.0-src/xen/arch/x86/built_in.o: In function `sh_validate_guest_entry':
/var/tmp/portage/app-emulation/xen-3.1.0/work/xen-3.1.0-src/xen/arch/x86/mm/shadow/common.c:544: undefined reference to `sh_map_and_validate_gl2e__shadow_2_guest_2'
/var/tmp/portage/app-emulation/xen-3.1.0/work/xen-3.1.0-src/xen/arch/x86/mm/shadow/common.c:534: undefined reference to `sh_map_and_validate_gl1e__shadow_2_guest_2'
/var/tmp/portage/app-emulation/xen-3.1.0/work/xen-3.1.0-src/xen/arch/x86/built_in.o: In function `sh_destroy_shadow':
/var/tmp/portage/app-emulation/xen-3.1.0/work/xen-3.1.0-src/xen/arch/x86/mm/shadow/common.c:1591: undefined reference to `sh_destroy_l1_shadow__shadow_2_guest_2'
/var/tmp/portage/app-emulation/xen-3.1.0/work/xen-3.1.0-src/xen/arch/x86/mm/shadow/common.c:1594: undefined reference to `sh_destroy_l2_shadow__shadow_2_guest_2'
/var/tmp/portage/app-emulation/xen-3.1.0/work/xen-3.1.0-src/xen/arch/x86/built_in.o: In function `shadow_unhook_mappings':
/var/tmp/portage/app-emulation/xen-3.1.0/work/xen-3.1.0-src/xen/arch/x86/mm/shadow/common.c:760: undefined reference to `sh_unhook_32b_mappings__shadow_2_guest_2'
/var/tmp/portage/app-emulation/xen-3.1.0/work/xen-3.1.0-src/xen/arch/x86/built_in.o: In function `trampoline_end':
(.data+0x11ac): undefined reference to `sh_remove_l1_shadow__shadow_2_guest_2'
/var/tmp/portage/app-emulation/xen-3.1.0/work/xen-3.1.0-src/xen/arch/x86/built_in.o: In function `trampoline_end':
(.data+0x11e4): undefined reference to `sh_rm_mappings_from_l1__shadow_2_guest_2'
/var/tmp/portage/app-emulation/xen-3.1.0/work/xen-3.1.0-src/xen/arch/x86/built_in.o: In function `trampoline_end':
(.data+0x11e8): undefined reference to `sh_rm_mappings_from_l1__shadow_2_guest_2'
/var/tmp/portage/app-emulation/xen-3.1.0/work/xen-3.1.0-src/xen/arch/x86/built_in.o: In function `trampoline_end':
(.data+0x1224): undefined reference to `sh_rm_write_access_from_l1__shadow_2_guest_2'
/var/tmp/portage/app-emulation/xen-3.1.0/work/xen-3.1.0-src/xen/arch/x86/built_in.o: In function `trampoline_end':
(.data+0x1228): undefined reference to `sh_rm_write_access_from_l1__shadow_2_guest_2'
make[3]: *** [/var/tmp/portage/app-emulation/xen-3.1.0/work/xen-3.1.0-src/xen/xen-syms] Error 1
make[3]: Leaving directory `/var/tmp/portage/app-emulation/xen-3.1.0/work/xen-3.1.0-src/xen/arch/x86'
make[2]: *** [/var/tmp/portage/app-emulation/xen-3.1.0/work/xen-3.1.0-src/xen/xen] Error 2
make[2]: Leaving directory `/var/tmp/portage/app-emulation/xen-3.1.0/work/xen-3.1.0-src/xen'
make[1]: *** [install] Error 2
make[1]: Leaving directory `/var/tmp/portage/app-emulation/xen-3.1.0/work/xen-3.1.0-src/xen'
make: *** [install-xen] Error 2

!!! ERROR: app-emulation/xen-3.1.0 failed.
Call stack:
  ebuild.sh, line 1615:   Called dyn_install
  ebuild.sh, line 1061:   Called qa_call 'src_install'
  ebuild.sh, line 44:   Called src_install
  xen-3.1.0.ebuild, line 84:   Called die

!!! install failed
!!! If you need support, post the topmost build error, and the call stack if relevant.
!!! A complete build log is located at '/var/tmp/portage/app-emulation/xen-3.1.0/temp/build.log'.


Any ideas?

I'll try to get back to this in the next 24 hrs, but work that pays calls.
Comment 7 slynn@granite-mtn.net 2007-05-22 19:54:45 UTC
my emerge --info:


Portage 2.1.2.7 (default-linux/x86/2006.1, gcc-4.1.2, glibc-2.5-r2, 2.6.16.49-xen i686)
=================================================================
System uname: 2.6.16.49-xen i686 Intel(R) Core(TM)2 CPU T7600 @ 2.33GHz
Gentoo Base System release 1.12.10
Timestamp of tree: Mon, 21 May 2007 13:30:01 +0000
dev-java/java-config: 1.3.7, 2.0.32
dev-lang/python:     2.4.4-r4
dev-python/pycrypto: 2.0.1-r5
sys-apps/sandbox:    1.2.18.1
sys-devel/autoconf:  2.13, 2.61
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10
sys-devel/binutils:  2.17
sys-devel/gcc-config: 1.3.16
sys-devel/libtool:   1.5.23b
virtual/os-headers:  2.6.21
ACCEPT_KEYWORDS="x86 ~x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -march=pentium-m -pipe -mno-tls-direct-seg-refs"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/X11/xkb"
CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/gconf /etc/revdep-rebuild /etc/terminfo"
CXXFLAGS="-O2 -march=pentium-m -pipe -mno-tls-direct-seg-refs"
DISTDIR="/usr/portage/distfiles"
FEATURES="distlocks metadata-transfer sandbox sfperms strict"
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo"
LINGUAS="en en_US"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --filter=H_**/files/digest-*"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage /usr/local/portage/layman"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="3dfx 3dnow X acl acpi alsa apm berkdb bitmap-fonts bzip2 cdr cli cracklib crypt cups dbus dri dvd foomaticdb gpm gtk gtk2 iconv imagemagick ipv6 isdnlog jpeg libg++ libwww lm_sensors midi mmx mudflap ncurses nls nptl nptlonly offensive opengl openmp pam pcre perl png ppds pppd python readline reflection samba session spl sse sse2 ssl svg tcpd tiff truetype truetype-fonts type1-fonts unicode usb x86 xml xml2 xorg xsl xslt zlib" ALSA_CARDS="hda-intel" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mulaw multi null plug rate route share shm softvol" ELIBC="glibc" INPUT_DEVICES="evdev keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en en_US" USERLAND="GNU" VIDEO_CARDS="apm fbdev vesa vga i810"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS

Comment 8 slynn@granite-mtn.net 2007-05-22 19:56:55 UTC
and sorry for the long posts.  i'll use attachments in the future.
Comment 9 slynn@granite-mtn.net 2007-05-23 17:27:06 UTC
Created attachment 120110 [details]
updated xen ebuild

Updates kernel version requirements.
Updates gcc options selection (no more nopie!)
Comment 10 slynn@granite-mtn.net 2007-05-23 17:31:26 UTC
In the xen ebuild (original post and updated) compile works but install does not.  It seems that install probably doesn't pick up that the code as already having been compiled previously (this is my assumption).  Even running the make install-xen by hand from source I get the same ld error.

I'll keep working, but if anybody has a clue please let me know.
Comment 11 Nathan Sullivan 2007-05-23 22:04:19 UTC
Hey Sean, how would you feel about making a 2.6.20/2.6.21 based xen-sources ebuild...? :) Hardware limitations here due to RAID driver in 2.6.19 upwards preventing me from using 2.6.18 or lower to test :)
Comment 12 Jan Oravec 2007-05-25 16:59:45 UTC
(In reply to comment #11)
> Hey Sean, how would you feel about making a 2.6.20/2.6.21 based xen-sources
> ebuild...? :) Hardware limitations here due to RAID driver in 2.6.19 upwards
> preventing me from using 2.6.18 or lower to test :)
> 

Official Xen patches are for 2.6.18 kernel. Fedora made a huge effort to port Xen to 2.6.20, we are using these patches with great success. There are also some 2.6.21 Xen kernels in openSUSE's development branch, but I wasn't able to get 2.6.21 dom0 able to run any domUs, although 2.6.21 domU works fine under 2.6.20 dom0.

My feeling is that Fedora's 2.6.20 Xen patches are stable enough for Gentoo portage inclusion.
Comment 13 Norbert Marx 2007-05-28 08:43:00 UTC
Dom0 with 5 DomU run stable in the last five days on amd64. Only the USB dma on top of virtual PCI (USB ADSL modem) are crashed at startup, but working.
Comment 14 Norbert Marx 2007-05-28 12:32:59 UTC
Created attachment 120513 [details]
hvm for amd64

Build of hvmloader enabled on amd64. Windows XP setup (32 bit) is starting on amd64.
Comment 15 Norbert Marx 2007-05-28 12:42:31 UTC
USB is working now in DomU if its completly disabled in Dom0. Looks like a interrupt routing/sharing problem.

Hardware:
00:03.0 USB Controller: Broadcom BCM5785 [HT1000] USB (rev 01)
00:03.1 USB Controller: Broadcom BCM5785 [HT1000] USB (rev 01)
00:03.2 USB Controller: Broadcom BCM5785 [HT1000] USB (rev 01)

Configuration hints
for Dom0: pciback.hide=(00:03.0)(00:03.1)
for DomU: pci = ['00:03.0']

(00:03.2) was planed for Dom0 but ohci_hcd has blocked all interrupts.
Comment 16 Nathan Sullivan 2007-05-30 08:48:33 UTC
I agree, ive been using the 2.6.18 xen kernel patches from like 3-4 months ago, pretty sure these were initially Redhat patches but they have worked rather well on some of my boxes. Im all for inclusion of the Redhat 2.6.20 patches if someones up for making the ebuild :) Drop it here and ill give it some testing

(In reply to comment #12)
> (In reply to comment #11)
> > Hey Sean, how would you feel about making a 2.6.20/2.6.21 based xen-sources
> > ebuild...? :) Hardware limitations here due to RAID driver in 2.6.19 upwards
> > preventing me from using 2.6.18 or lower to test :)
> > 
> 
> Official Xen patches are for 2.6.18 kernel. Fedora made a huge effort to port
> Xen to 2.6.20, we are using these patches with great success. There are also
> some 2.6.21 Xen kernels in openSUSE's development branch, but I wasn't able to
> get 2.6.21 dom0 able to run any domUs, although 2.6.21 domU works fine under
> 2.6.20 dom0.
> 
> My feeling is that Fedora's 2.6.20 Xen patches are stable enough for Gentoo
> portage inclusion.
> 

Comment 17 Christian Axelsson 2007-05-30 09:28:50 UTC
(In reply to comment #16)
> I agree, ive been using the 2.6.18 xen kernel patches from like 3-4 months ago,
> pretty sure these were initially Redhat patches but they have worked rather
> well on some of my boxes. Im all for inclusion of the Redhat 2.6.20 patches if
> someones up for making the ebuild :) Drop it here and ill give it some testing
> 
> (In reply to comment #12)
> > (In reply to comment #11)
> > > Hey Sean, how would you feel about making a 2.6.20/2.6.21 based xen-sources
> > > ebuild...? :) Hardware limitations here due to RAID driver in 2.6.19 upwards
> > > preventing me from using 2.6.18 or lower to test :)
> > > 
> > 
> > Official Xen patches are for 2.6.18 kernel. Fedora made a huge effort to port
> > Xen to 2.6.20, we are using these patches with great success. There are also
> > some 2.6.21 Xen kernels in openSUSE's development branch, but I wasn't able to
> > get 2.6.21 dom0 able to run any domUs, although 2.6.21 domU works fine under
> > 2.6.20 dom0.
> > 
> > My feeling is that Fedora's 2.6.20 Xen patches are stable enough for Gentoo
> > portage inclusion.
> > 
> 

I'm atleast up for testing it. Where can I find the patches?
Comment 18 Jan Oravec 2007-05-30 09:47:49 UTC
(In reply to comment #17)
> I'm atleast up for testing it. Where can I find the patches?

You can extract it from source RPM package, for example from here:

http://ftp.upjs.sk/pub/fedora/linux/core/development/source/SRPMS/kernel-xen-2.6-2.6.20-2925.9.fc7.src.rpm
Comment 19 Christian Axelsson 2007-05-30 10:24:17 UTC
(In reply to comment #18)
> (In reply to comment #17)
> > I'm atleast up for testing it. Where can I find the patches?
> 
> You can extract it from source RPM package, for example from here:
> 
> http://ftp.upjs.sk/pub/fedora/linux/core/development/source/SRPMS/kernel-xen-2.6-2.6.20-2925.9.fc7.src.rpm

Wow, that's a lot of files. How do I apply them? I've never worked with fedora (nor rpm) before.
Comment 20 Jan Oravec 2007-05-30 10:42:59 UTC
(In reply to comment #19)
> Wow, that's a lot of files. How do I apply them? I've never worked with fedora
> (nor rpm) before.

Take just linux-2.6-xen.patch and apply to 2.6.20.x.
Comment 21 Christian Axelsson 2007-05-30 10:47:19 UTC
(In reply to comment #20)
> (In reply to comment #19)
> > Wow, that's a lot of files. How do I apply them? I've never worked with fedora
> > (nor rpm) before.
> 
> Take just linux-2.6-xen.patch and apply to 2.6.20.x.

Ah thanks, didn't notice that file :)
It applied nicely to 2.6.20.3, will try against 2.6.20.7 later.
Do you know if any effort is made to get xen working against 2.6.21?
Comment 22 Christian Axelsson 2007-05-30 11:22:27 UTC
(In reply to comment #21)
> (In reply to comment #20)
> > (In reply to comment #19)
> > > Wow, that's a lot of files. How do I apply them? I've never worked with fedora
> > > (nor rpm) before.
> > 
> > Take just linux-2.6-xen.patch and apply to 2.6.20.x.
> 
> Ah thanks, didn't notice that file :)
> It applied nicely to 2.6.20.3, will try against 2.6.20.7 later.
> Do you know if any effort is made to get xen working against 2.6.21?

In both 2.6.20.3 and 2.6.20.7 I got the error:
  AS      arch/i386/kernel/head-xen.o
arch/i386/kernel/head-xen.S: Assembler messages:
arch/i386/kernel/head-xen.S:251: Error: too many positional arguments
arch/i386/kernel/head-xen.S:253: Error: too many positional arguments
make[1]: *** [arch/i386/kernel/head-xen.o] Error 1

Comment 23 Christian Axelsson 2007-05-30 13:52:39 UTC
I get the same problem when compiling xen as post #7 even though I'm using the updated ebuild.
Comment 24 slynn@granite-mtn.net 2007-05-30 15:32:48 UTC
Sorry, have been busy at work.  With regard to supporting Red Hat patches... I have nothing against this, but I remember a bug thread months ago (xen-2 -> xen-3  migration?) where Gentoo Xen maintainers argued against supporting this.  This subject has come up previously.

This is probably not the place to be discussing this.  I started a forum topic at:

http://forums.gentoo.org/viewtopic-t-562470.html


As I state in the forum, I believe the FC patches have their place, but perhaps not in portage and definitely not in this bug.  This bug should be for getting the Xen released 3.1.0 version working on Gentoo.

That being said, thanks to the URL's about the FC patches I'll start looking at what this requires.  Perhaps a GUE (Grand Unified Ebuild :)  is possible?

Comment 25 Christian Axelsson 2007-05-30 16:49:42 UTC
(In reply to comment #24)
> Sorry, have been busy at work.  With regard to supporting Red Hat patches... I
> have nothing against this, but I remember a bug thread months ago (xen-2 ->
> xen-3  migration?) where Gentoo Xen maintainers argued against supporting this.
>  This subject has come up previously.
> 
> This is probably not the place to be discussing this.  I started a forum topic
> at:
> 
> http://forums.gentoo.org/viewtopic-t-562470.html
> 
> 
> As I state in the forum, I believe the FC patches have their place, but perhaps
> not in portage and definitely not in this bug.  This bug should be for getting
> the Xen released 3.1.0 version working on Gentoo.
> 
> That being said, thanks to the URL's about the FC patches I'll start looking at
> what this requires.  Perhaps a GUE (Grand Unified Ebuild :)  is possible?
> 

True that the discussion not belongs here, sorry :)
Still, I have problems with post #33
Comment 26 Christian Axelsson 2007-05-30 16:50:26 UTC
(In reply to comment #25)
> Still, I have problems with post #33

s/33/23/
Sorry for the spam :(
Comment 27 Christian Axelsson 2007-05-31 10:00:01 UTC
It seems like our 3.1.0 ebuild only compiles with USE="pae"
Comment 28 Alan Woods 2007-06-05 10:25:45 UTC
For those trying to compile the RH sources and getting this error:

arch/i386/kernel/head-xen.S: Assembler messages:
arch/i386/kernel/head-xen.S:251: Error: too many positional arguments
arch/i386/kernel/head-xen.S:253: Error: too many positional arguments
make[1]: *** [arch/i386/kernel/head-xen.o] Error 1

Updating binutils to 2.17 fixed this for me. It seems to be some sort of macro preprocessor problem with the current stable version (2.16.1-r3).
Comment 29 Erkki Eilonen 2007-06-17 11:22:29 UTC
I'm getting build errors with xen-3.1.0, with and without the pie use flag.
Comment 30 Erkki Eilonen 2007-06-17 11:24:11 UTC
Created attachment 122309 [details]
xen-3.1.0 build log
Comment 31 Erkki Eilonen 2007-06-17 11:24:44 UTC
Created attachment 122311 [details]
Emerge info
Comment 32 Dave Liefbroer 2007-07-06 06:48:39 UTC
I check the original Makefile for the installation procedure. 
The following patch makes the build work again
----------------------------------------------<SNIP>
--- xen1        2007-07-06 08:44:40.000000000 +0200
+++ xen2        2007-07-06 08:45:58.000000000 +0200
@@ -88,7 +88,7 @@
        use debug && myopt="${myopt} debug=y"
        use pae && myopt="${myopt} pae=y"

-       emake DESTDIR="${D}" ${myopt} install-xen || die "install failed"
+       emake DESTDIR="${D}" ${myopt} -C xen install || die "install failed"
 }

 pkg_postinst() {
----------------------------------------------<SNIP>

Does anyone know if the custom CFLAGS filter is still needed. I haven't read anything about this on the Xen mailinglists, maybe it's still in the ebuild from 2.x ?
Comment 33 Micheal Marineau (RETIRED) gentoo-dev 2007-07-14 18:34:44 UTC
Xen ebuilds for 3.1.0 are now available in the xen project overlay which can be fetched via layman, the overlay name is 'xen'

I think I have addressed most of the issues that I know of except I wasn't able to reproduce the problems in comments #6 and #10 and I haven't even looked at custom cflags yet (I've never built xen with custom cflags). Please test things and let me know if there is something I missed.

As for the Fedora 2.6.20 kernel, I would like to get that working eventually as well. Both rbu and I have been fiddling with it but something is different about the console in the Fedora kernel and only kernel messages are printed. If you have been having better luck with the fedora kernel let me know. My 2.6.20 ebuild is available via layman in the 'marineam-xen' overlay, rbu's is in his overlay at http://overlays.gentoo.org/svn/dev/rbu/overlay/sys-kernel/xen-sources/
Comment 34 Sven 2007-07-15 00:52:07 UTC
(In reply to comment #33)
> Xen ebuilds for 3.1.0 are now available in the xen project overlay which can be
> fetched via layman, the overlay name is 'xen'

Haven't bootet yet, but once again, "make install" doesn't work properly, since somebody has removed the XENGUEST variable from the kernel's Makefile.

Usually, there's this line in the main Makefile:
  XENGUEST = -xen


In xen-sources-2.6.18, it's missing. I did a quick grep, and yes, the XENGUEST variable is still used.
Comment 35 Micheal Marineau (RETIRED) gentoo-dev 2007-07-15 02:21:26 UTC
(In reply to comment #34)
> (In reply to comment #33)
> > Xen ebuilds for 3.1.0 are now available in the xen project overlay which can be
> > fetched via layman, the overlay name is 'xen'
> 
> Haven't bootet yet, but once again, "make install" doesn't work properly, since
> somebody has removed the XENGUEST variable from the kernel's Makefile.
> 
> Usually, there's this line in the main Makefile:
>   XENGUEST = -xen
> 
> 
> In xen-sources-2.6.18, it's missing. I did a quick grep, and yes, the XENGUEST
> variable is still used.
> 

Oh, I missed that the 'make install' problem was with the kernel tree not the ebuild. I'll roll a patch to fix that soonish. Thanks for the report.
Comment 36 Micheal Marineau (RETIRED) gentoo-dev 2007-07-17 01:56:09 UTC
I've fixed the issue with 2.6.20 that prevented the console from behaving as it did in previous versions and added the ebuild to the main xen project overlay.

Also xen-sources' make install should generally behave nicely now.
Comment 37 Sven 2007-07-23 15:58:44 UTC
(In reply to comment #36)
> 2.6.20

So i tried that ebuild. But actually it fails to compile on amd64.

Here's the error-message:

# make all
  CHK     include/linux/version.h
  CHK     include/linux/utsrelease.h
  CHK     include/linux/compile.h
  GEN     .version
  CHK     include/linux/compile.h
  UPD     include/linux/compile.h
  CC      init/version.o
  LD      init/built-in.o
  LD      .tmp_vmlinux1
arch/x86_64/kernel/built-in.o: In function `quirk_intel_irqbalance':
(.init.text+0x2664): undefined reference to `no_irq_affinity'
make: *** [.tmp_vmlinux1] Fehler 1


I can attach the .config if you want.
Comment 38 Sven 2007-07-23 16:55:08 UTC
Created attachment 125760 [details]
.config for 2.6.20, which doesn't compile on amd64

.config for 2.6.20, which doesn't compile on amd64
Comment 39 Micheal Marineau (RETIRED) gentoo-dev 2007-07-23 18:24:29 UTC
(In reply to comment #37)
> (In reply to comment #36)
> > 2.6.20
> 
> So i tried that ebuild. But actually it fails to compile on amd64.
> 
> Here's the error-message:
> 
> # make all
>   CHK     include/linux/version.h
>   CHK     include/linux/utsrelease.h
>   CHK     include/linux/compile.h
>   GEN     .version
>   CHK     include/linux/compile.h
>   UPD     include/linux/compile.h
>   CC      init/version.o
>   LD      init/built-in.o
>   LD      .tmp_vmlinux1
> arch/x86_64/kernel/built-in.o: In function `quirk_intel_irqbalance':
> (.init.text+0x2664): undefined reference to `no_irq_affinity'
> make: *** [.tmp_vmlinux1] Fehler 1
> 
> 
> I can attach the .config if you want.
> 

The problem was caused by no SMP support in the config. I've added a patch that should fix this, please update your overlay and re-emerge xen-sources-2.6.20.
Comment 40 Sven 2007-07-24 00:56:00 UTC
(In reply to comment #39)
> The problem was caused by no SMP support in the config. I've added a patch that
> should fix this, please update your overlay and re-emerge xen-sources-2.6.20.

Compiled and booted fine.
But two new problems are there now:

xen-sources-2.6.18-r1 in the overlay has problems fetching some files:
>>> Downloading 'http://dev.gentoo.org/~marineam/files/xen/patch-2.6.18.2_to_xen-3.1.0.bz2'
--02:54:11--  http://dev.gentoo.org/~marineam/files/xen/patch-2.6.18.2_to_xen-3.1.0.bz2
           => `/usr/local/portage/distfiles/patch-2.6.18.2_to_xen-3.1.0.bz2'
Auflösen des Hostnamen »dev.gentoo.org«.... 140.211.166.183
Verbindungsaufbau zu dev.gentoo.org|140.211.166.183|:80... verbunden.
HTTP Anforderung gesendet, warte auf Antwort... 404 Not Found
02:54:11 FEHLER 404: Not Found.

!!! Couldn't download 'patch-2.6.18.2_to_xen-3.1.0.bz2'. Aborting.



And i tried to use 2.6.20 to build a domU kernel. But it fails with these errors:

# make all
  CHK     include/linux/version.h
  CHK     include/linux/utsrelease.h
  CHK     include/linux/compile.h
  GEN     .version
  CHK     include/linux/compile.h
  UPD     include/linux/compile.h
  CC      init/version.o
  LD      init/built-in.o
  LD      .tmp_vmlinux1
arch/x86_64/kernel/built-in.o: In function `send_IPI_self':
(.text+0xa02a): undefined reference to `xen_send_IPI_shortcut'
arch/x86_64/kernel/built-in.o: In function `clustered_apic_check':
(.init.text+0x34f3): undefined reference to `apic_xen'
arch/x86_64/kernel/built-in.o: In function `clustered_apic_check':
(.init.text+0x3507): undefined reference to `apic_xen'
arch/x86_64/kernel/built-in.o: In function `k8nops':
alternative.c:(.data+0x13f0): undefined reference to `apic_xen'
make: *** [.tmp_vmlinux1] Fehler 1


I will attach the config in a minute.
Comment 41 Sven 2007-07-24 00:57:59 UTC
Created attachment 125814 [details]
.config for 2.6.20 domU kernel, which doesn't compile
Comment 42 Micheal Marineau (RETIRED) gentoo-dev 2007-07-24 01:13:30 UTC
(In reply to comment #40)
> (In reply to comment #39)
> > The problem was caused by no SMP support in the config. I've added a patch that
> > should fix this, please update your overlay and re-emerge xen-sources-2.6.20.
> 
> Compiled and booted fine.
> But two new problems are there now:
> 
> xen-sources-2.6.18-r1 in the overlay has problems fetching some files:
> >>> Downloading 'http://dev.gentoo.org/~marineam/files/xen/patch-2.6.18.2_to_xen-3.1.0.bz2'
> --02:54:11-- 
> http://dev.gentoo.org/~marineam/files/xen/patch-2.6.18.2_to_xen-3.1.0.bz2
>            => `/usr/local/portage/distfiles/patch-2.6.18.2_to_xen-3.1.0.bz2'
> Auflösen des Hostnamen »dev.gentoo.org«.... 140.211.166.183
> Verbindungsaufbau zu dev.gentoo.org|140.211.166.183|:80... verbunden.
> HTTP Anforderung gesendet, warte auf Antwort... 404 Not Found
> 02:54:11 FEHLER 404: Not Found.
> 
> !!! Couldn't download 'patch-2.6.18.2_to_xen-3.1.0.bz2'. Aborting.

Oops, forgot to upload that file. It is available now.

> 
> 
> 
> And i tried to use 2.6.20 to build a domU kernel. But it fails with these
> errors:
> 
> # make all
>   CHK     include/linux/version.h
>   CHK     include/linux/utsrelease.h
>   CHK     include/linux/compile.h
>   GEN     .version
>   CHK     include/linux/compile.h
>   UPD     include/linux/compile.h
>   CC      init/version.o
>   LD      init/built-in.o
>   LD      .tmp_vmlinux1
> arch/x86_64/kernel/built-in.o: In function `send_IPI_self':
> (.text+0xa02a): undefined reference to `xen_send_IPI_shortcut'
> arch/x86_64/kernel/built-in.o: In function `clustered_apic_check':
> (.init.text+0x34f3): undefined reference to `apic_xen'
> arch/x86_64/kernel/built-in.o: In function `clustered_apic_check':
> (.init.text+0x3507): undefined reference to `apic_xen'
> arch/x86_64/kernel/built-in.o: In function `k8nops':
> alternative.c:(.data+0x13f0): undefined reference to `apic_xen'
> make: *** [.tmp_vmlinux1] Fehler 1
> 
> 
> I will attach the config in a minute.
> 

Lame, looks like another UP/SMP related bug. I'll take a look at it soon.
Comment 43 Robert Buchholz (RETIRED) gentoo-dev 2007-07-24 18:01:42 UTC
(In reply to comment #33)
> Xen ebuilds for 3.1.0 are now available in the xen project overlay which can be
> fetched via layman, the overlay name is 'xen'

For all of you who already checked out that overlay, please update your list, delete and re-checkout as we changed the URI:
# layman -f
# layman -d xen
# layman -a xen

Thanks a lot
Comment 44 Robert Buchholz (RETIRED) gentoo-dev 2007-07-24 18:26:20 UTC
Revbumped both 2.6.18 and 2.6.20 in the repository.
The first contains security updates, see
http://overlays.gentoo.org/proj/xen/browser/patches/tags/2.6.18/debian-security-patches-2.6.18.1-12etch2/README for details. 2.6.20-r1 contains three bugfixes (TCP Checksum error, LVM race condition and No-Poweroff problem).

Please test.
Comment 45 Sven 2007-07-25 12:15:26 UTC
Bad news: i can't compile a domU kernel with xen-sources-2.6.18-r2. This error appears:

linux-2.6.18-xen-r2 # make all
  CHK     include/linux/version.h
  CHK     include/linux/utsrelease.h
  CHK     include/linux/compile.h
  GEN     .version
  CHK     include/linux/compile.h
  UPD     include/linux/compile.h
  CC      init/version.o
  LD      init/built-in.o
  LD      .tmp_vmlinux1
arch/x86_64/kernel/built-in.o: In function `identify_cpu':
(.init.text+0x5e6): undefined reference to `genapic'
make: *** [.tmp_vmlinux1] Fehler 1
Comment 46 Sven 2007-07-25 12:16:27 UTC
Created attachment 125969 [details]
.config for 2.6.18 domU kernel, which doesn't compile
Comment 47 Micheal Marineau (RETIRED) gentoo-dev 2007-07-25 16:08:42 UTC
(In reply to comment #45)
> Bad news: i can't compile a domU kernel with xen-sources-2.6.18-r2. This error
> appears:
> 
> linux-2.6.18-xen-r2 # make all
>   CHK     include/linux/version.h
>   CHK     include/linux/utsrelease.h
>   CHK     include/linux/compile.h
>   GEN     .version
>   CHK     include/linux/compile.h
>   UPD     include/linux/compile.h
>   CC      init/version.o
>   LD      init/built-in.o
>   LD      .tmp_vmlinux1
> arch/x86_64/kernel/built-in.o: In function `identify_cpu':
> (.init.text+0x5e6): undefined reference to `genapic'
> make: *** [.tmp_vmlinux1] Fehler 1
> 

I've seen this issue as well but haven't gotten around to rolling a patch for it yet, until I do just compile with SMP support and it should build just fine.
Comment 48 Sven 2007-07-27 22:35:59 UTC
(In reply to comment #47)
> I've seen this issue as well but haven't gotten around to rolling a patch for
> it yet, until I do just compile with SMP support and it should build just fine.

Yes, that workes for me.


But another problem: are you going to support no-multilib systems?
My host-system is running the no-multilib profile, just to save some space and compile-time. But xen-tools-3.1 wants to compile some bochs BIOS which requires "gcc -m32" to work, which actually doesn't work just because /usr/include/gnu/stubs-32.h is missing on no-multilib-systems. (Actually, -m32 seems to work on no-multilib systems as long as you don't include such headers files or try to link ...)

Anyway: is there away to disable compilation of the BOCHS bios?
Because if the ioemu flag is turned of, nobody needs that bios, right?
Comment 49 Micheal Marineau (RETIRED) gentoo-dev 2007-07-27 22:56:18 UTC
(In reply to comment #48)
> But another problem: are you going to support no-multilib systems?
> My host-system is running the no-multilib profile, just to save some space and
> compile-time. But xen-tools-3.1 wants to compile some bochs BIOS which requires
> "gcc -m32" to work, which actually doesn't work just because
> /usr/include/gnu/stubs-32.h is missing on no-multilib-systems. (Actually, -m32
> seems to work on no-multilib systems as long as you don't include such headers
> files or try to link ...)
> 
> Anyway: is there away to disable compilation of the BOCHS bios?
> Because if the ioemu flag is turned of, nobody needs that bios, right?
> 

HVM guests are not supported on no-multilib profiles but last I checked it gracefully simply didn't compile it if it couldn't. I'll try to reproduce this.

Thanks for testing this so much, you are finding all sorts of stuff :-)
Comment 50 Sven 2007-07-29 18:21:52 UTC
Here's some more information, about why xen-tools-3.1 fails on no-multilib systems:


# LANG=C emerge -1 --nodeps xen-tools -vp

These are the packages that would be merged, in order:

[ebuild     U ] app-emulation/xen-tools-3.1.0 [3.0.4_p1] USE="screen -custom-cflags -debug -doc -ioemu -pygrub" 0 kB [1] 

Total: 1 package (1 upgrade), Size of downloads: 0 kB
Portage overlays:
 [1] /usr/portage/local/layman/xen

# LANG=C emerge -1 --nodeps xen-tools -vp
...
make[3]: Entering directory `/var/tmp/portage/app-emulation/xen-tools-3.1.0/work/xen-3.1.0-src/tools/firmware/rombios/32bit/tcgbios'
gcc   -m32 -march=i686 -DNDEBUG -std=gnu99 -Wall -Wstrict-prototypes -Wno-unused-value -Wdeclaration-after-statement  -D__XEN_TOOLS__  -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -mno-tls-direct-seg-refs -fno-builtin -O2 -msoft-float -nostdlib -fno-stack-protector  -I../ -I../../ -DGCC_PROTOS -c -o tcgbios.o tcgbios.c
In file included from /usr/include/features.h:346,
                 from /usr/include/stdint.h:26,
                 from ../rombios_compat.h:8,
                 from tcgbios.c:24:
/usr/include/gnu/stubs.h:7:27: error: gnu/stubs-32.h: No such file or directory
make[3]: *** [tcgbios.o] Error 1
make[3]: Leaving directory `/var/tmp/portage/app-emulation/xen-tools-3.1.0/work/xen-3.1.0-src/tools/firmware/rombios/32bit/tcgbios'
make[2]: *** [subdirs] Error 2
make[2]: Leaving directory `/var/tmp/portage/app-emulation/xen-tools-3.1.0/work/xen-3.1.0-src/tools/firmware/rombios/32bit'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/var/tmp/portage/app-emulation/xen-tools-3.1.0/work/xen-3.1.0-src/tools/firmware'
make: *** [all] Error 2
make: Leaving directory `/var/tmp/portage/app-emulation/xen-tools-3.1.0/work/xen-3.1.0-src/tools'

!!! ERROR: app-emulation/xen-tools-3.1.0 failed.


Comment 51 Micheal Marineau (RETIRED) gentoo-dev 2007-07-30 04:14:35 UTC
(In reply to comment #50)
> Here's some more information, about why xen-tools-3.1 fails on no-multilib
> systems:

Could you post your emerge --info please? It works for me on hardened/amd64.
Comment 52 Sven 2007-07-30 13:47:24 UTC
(In reply to comment #51)
> (In reply to comment #50)
> > Here's some more information, about why xen-tools-3.1 fails on no-multilib
> > systems:
> 
> Could you post your emerge --info please? It works for me on hardened/amd64.

# emerge info
*** Deprecated use of action 'info', use '--info' instead
Portage 2.1.2.9 (default-linux/amd64/2007.0/no-multilib, gcc-4.1.2, glibc-2.5-r4, 2.6.20-xen-r1 x86_64)
=================================================================
System uname: 2.6.20-xen-r1 x86_64 AMD Athlon(tm) 64 Processor 3800+
Gentoo Base System release 1.12.9
Timestamp of tree: Fri, 27 Jul 2007 04:00:01 +0000
dev-lang/python:     2.4.4-r4
dev-python/pycrypto: 2.0.1-r5
sys-apps/sandbox:    1.2.17
sys-devel/autoconf:  2.13, 2.61
sys-devel/automake:  1.6.3, 1.8.5-r3, 1.9.6-r2, 1.10
sys-devel/binutils:  2.17
sys-devel/gcc-config: 1.3.16
sys-devel/libtool:   1.5.23b
virtual/os-headers:  2.6.21
ACCEPT_KEYWORDS="amd64"
AUTOCLEAN="yes"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc"
CONFIG_PROTECT_MASK="/etc/env.d /etc/gconf /etc/revdep-rebuild /etc/terminfo"
CXXFLAGS="-O2 -pipe"
DISTDIR="/usr/local/portage/distfiles"
FEATURES="distlocks metadata-transfer parallel-fetch sandbox sfperms strict"
GENTOO_MIRRORS="        http://ftp.uni-erlangen.de/pub/mirrors/gentoo   http://ftp-stud.fht-esslingen.de/pub/Mirrors/gentoo/ "
LANG="de_DE@euro"
LINGUAS="de"
MAKEOPTS="-j1"
PKGDIR="/usr/local/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --filter=H_**/files/digest-*"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/portage/local/layman/xen /usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="amd64 bitmap-fonts bzip2 cli cracklib crypt cups dri iconv isdnlog libg++ logrotate midi mmx ncurses nls nptl nptlonly openmp pam pcre perl pppd python readline reflection screen session spl sse sse2 truetype-fonts type1-fonts unicode xorg zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mulaw multi null plug rate route share shm softvol" ELIBC="glibc" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="de" USERLAND="GNU" VIDEO_CARDS="apm ark chips cirrus cyrix dummy fbdev glint i128 i810 mach64 mga neomagic nv r128 radeon rendition s3 s3virge savage siliconmotion sis sisusb tdfx tga trident tseng v4l vesa vga via vmware voodoo"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, LDFLAGS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 53 Micheal Marineau (RETIRED) gentoo-dev 2007-08-07 19:44:38 UTC
Ok, I finally got a 2007.0/no-multilib system up to test xen on. I've added a new use flag 'hvm' to toggle all hvm related support in xen-tools. The ebuild will now properly build on a no-multilib profile when hvm is turned off. The old ioemu flag has been removed in favor of the hvm flag.
Comment 54 Sven 2007-08-07 21:33:15 UTC
(In reply to comment #53)
> Ok, I finally got a 2007.0/no-multilib system up to test xen on. I've added a
> new use flag 'hvm' to toggle all hvm related support in xen-tools. The ebuild
> will now properly build on a no-multilib profile when hvm is turned off. The
> old ioemu flag has been removed in favor of the hvm flag.

Thank you! Great work! You surely have spent some hours in compiling a no-multilib system. Thanks!

I will test asap.
Comment 55 Sven 2007-08-07 22:25:51 UTC
(In reply to comment #53)
> Ok, I finally got a 2007.0/no-multilib system up to test xen on. I've added a
> new use flag 'hvm' to toggle all hvm related support in xen-tools. The ebuild
> will now properly build on a no-multilib profile when hvm is turned off. The
> old ioemu flag has been removed in favor of the hvm flag.

Works fine for me. (booted 2.6.20-r1 dom0 and 2 domUs)
No probs with my no-multilib system.
Comment 56 Jan Oravec 2007-08-07 22:37:59 UTC
Just a quick note - Fedora ported Xen patch to 2.6.21:

* Tue Jul 24 2007 Eduardo Habkost <ehabkost@redhat.com>
- Rebase to 2.6.21.6

mirror/fedora/linux/development/source/SRPMS/kernel-xen-2.6-2.6.21-2925.14.fc8.src.rpm

P.S. running xen-sources-2.6.20-r1 on amd64, works fine, thanks!
Comment 57 Micheal Marineau (RETIRED) gentoo-dev 2007-08-08 02:05:19 UTC
As of now all of the 2.6.18-r* and 2.6.20* kernels should build non-smp domU kernels properly. I didn't do a revbump for the issue since it didn't impact working setups. Grab the latest xen overlay and re-emerge the xen-sources version of your choice.

I think that was the last major issue remaining for 3.1.0, let me know if I forgot about something.
Comment 58 Sven 2007-08-08 02:45:07 UTC
Great work! Will test non-SMP build tomorrow.


Maybe this doesn't belong here, but the ebuild only installs one copy of the kernel-sources. Typically, i do the following:
I copy the kernel sources to another folder. Then i use one folder to compile dom0 and one for domU.

How do other people deal with it? Would it be useful for you too, to have a use-flag to install 2 copies of the sources?


Comment 59 Micheal Marineau (RETIRED) gentoo-dev 2007-08-08 03:51:14 UTC
(In reply to comment #58)
> Maybe this doesn't belong here, but the ebuild only installs one copy of the
> kernel-sources. Typically, i do the following:
> I copy the kernel sources to another folder. Then i use one folder to compile
> dom0 and one for domU.
> 
> How do other people deal with it? Would it be useful for you too, to have a
> use-flag to install 2 copies of the sources?
> 

One option is to have the build system place all output files into a different tree. ie: make O=~/kbuild/domU

To make it easier you can turn the above into an alias so all you have to do is:
makeU menuconfig
makeU

and

make0 menuconfig
make0

That will also allow you to do your kernel builds as a normal user instead of root and no space is wasted by copying the source tree.

I usually don't bother with the above and just make sure I backup the .config but it is a good solution.
Comment 60 Sven 2007-08-08 04:25:05 UTC
> ie: make O=~/kbuild/domU

Thanks! Good sollution - the aliases too.
Comment 61 Bogdan Lipski 2007-08-15 13:23:13 UTC
hi folks,

config: Intel e6300,gigabyte ds3(ICH8), 6GB RAM, gentoo 2007.0 (fully updated), xen newest from layman xen overlay - 3.1.0 with xen-sources-2.6.20-r1

Just a quick question - on gentoo amd64 version with 4gb ram (or more) - do you also have a problem with domain0 crashing shortly after xen boots it (during first memory access by domain0 kernel)? just upgraded mem on my system (from 2GB) and i am scratching my head since yesterday evening, for now i figured out the following:
- with 3GB it runs fine, any memory module combination (hw problem excluded)
- researching with google noticed that this seems to have sth to do with old, dreaded 32-bit addressing problem which I, as many others before me :-) was trying to overcome by flying onto amd64 platform (in short: 64 bit amd/em64t cpu is more than able to handle whatever address you throw at him, but the bios/chipset, pci cards still have 32-bit address limitations, generally it boils down to how correctly chipset/bios/linux kernel are able to handle remapping these resources onto 64bit) - well on my setup obviously there is sth wrong here with this remapping magic :-)
- on gentoo forums i noticed something that really worried me - sbd reported the similar/same problem with gentoo-sources-2.6.20-r8 kernel, this was solved by upgrade to the newest 2.6.22 gentoo-sources kernel, a luxury which we can not afford with xenified kernel obviously...

so to put long story short - has sbd came across sth similar and fixed it somehow in xen-sources-2.6.20-r1 kernel somehow? I saw sth about adding "mem=" parameter to kernel commandline, but results were mixed. anyway i am going to try it after work, but are there any other ideas about what to try?

Any responses appreciated!

Rgds,
bogdan
Comment 62 Robert Buchholz (RETIRED) gentoo-dev 2007-08-15 16:37:52 UTC
Bogdan, does this (for you) only happen with Xen kernels or also with normal kernels? If you did not, please give it some rounds of memtest.
Even though every mem module works fine, my board/bios also has problems with more than 3GB attached.
Comment 63 Bogdan Lipski 2007-08-15 23:18:28 UTC
Hi Robert,

yes it does crash normal 2.6.20-gentoo-r8 kernel as well - just made some excluding tests a moment ago, conclusions:
- with up to 3GB all is super, does not matter which combination I use (hw-wise I have 2x1GB + 2x2GB)
- with anything above it (4,5,6GB) both kernel 2.6.20-gentoo-r8 and xen-sources-2.6.20-r1 crash, xenkernel just dumps lots of kernel-exception-registers-rubbish, where 2.6.20-gentoo-r8 is a bit more talkative and this way i can confirm my worst suspicion: problem is the same as the one I mentioned yesterday that it was described on gentoo forums: http://forums.gentoo.org/viewtopic-t-575004-highlight-rip+value.html

and the error is also exactly the same (from my crash):
Code:  Bad RIP value.
RIP  [<0000000000000005>]
 RSP <ffff81019fc83f90>
CR2: 0000000000000005
 <0>Kernel panic - not syncing: Aiee, killing interrupt handler!

please note - different motherboard (asus vs gigabyte)

I will have have a look at the bios tomorrow, but from what i saw chances are slim with my mobo (gigabyte i965 ds3) to find any options for mem remapping, also bios is afair the newest (f11 or f12).

I will let you know if I find anything else. If sbd wants to have a look at dmesgs from 2 kernel crashes (2.6.20 and 2.6.20-xen) and 1 boot (2.6.22) please let me know and i will attach them.

SO...problem fixed in 2.6.22, unfortunately this is not what i want :-)

Rgds,
B.
Comment 64 Cédric Schieli 2007-08-16 10:17:38 UTC
Created attachment 128252 [details]
Ebuild and patch for xen-sources-2.6.22

This is an ebuild for a xen-sources-2.6.22

The patch was borrowed from upcoming Ubuntu Gutsy. I've only tested domU, as my dom0 is an Ubuntu (with the exact same patch).

Maybe this one will fix Bogdan's problem
Comment 65 Bogdan Lipski 2007-08-16 12:21:59 UTC
Super! Did not know that ubuntu is that far with xen :-) I am going to test this and let you know. Thx Cedric!

B.
Comment 66 mario 2007-08-17 00:30:49 UTC
Hello,

I get a compile error when installing app-emulation/xen-tools-3.1.0 from the overlay.

Do you know what is wrong here? :-/

The compile-log is attached.
Comment 67 mario 2007-08-17 00:31:39 UTC
Created attachment 128352 [details]
app-emulation/xen-tools-3.1.0 build error log
Comment 68 mario 2007-08-17 00:33:22 UTC
And compiling 2.6.22 gives me an error as well. But this is not so important, cause I can just use the older kernel :-)


linux-2.6.22-xen # make
  CHK     include/linux/version.h
  CHK     include/linux/utsrelease.h
  CC      arch/x86_64/kernel/asm-offsets.s
In file included from include/linux/mm.h:40,
                 from include/linux/suspend.h:11,
                 from arch/x86_64/kernel/asm-offsets.c:12:
include/asm/mach-xen/asm/pgtable.h:489: Fehler: »ptep« ist hier nicht deklariert (nicht in einer Funktion)
include/asm/mach-xen/asm/pgtable.h:489: Fehler: »entry« ist hier nicht deklariert (nicht in einer Funktion)
include/asm/mach-xen/asm/pgtable.h:489: Fehler: expected identifier or »(« before »if«
include/asm/mach-xen/asm/pgtable.h:489: Fehler: expected identifier or »(« before »while«
include/asm/mach-xen/asm/pgtable.h:489: Warnung: Datendefinition hat keinen Typ oder Speicherklasse
include/asm/mach-xen/asm/pgtable.h:489: Warnung: »int« ist Standardtyp in Deklaration von »__changed«
include/asm/mach-xen/asm/pgtable.h:489: Fehler: expected identifier or »(« before »}« token
include/asm/mach-xen/asm/pgtable.h:489: Fehler: expected identifier or »(« before »)« token
make[1]: *** [arch/x86_64/kernel/asm-offsets.s] Fehler 1
make: *** [prepare0] Fehler 2
Comment 69 Micheal Marineau (RETIRED) gentoo-dev 2007-08-17 00:34:51 UTC
(In reply to comment #66)
> Hello,
> 
> I get a compile error when installing app-emulation/xen-tools-3.1.0 from the
> overlay.
> 
> Do you know what is wrong here? :-/
> 
> The compile-log is attached.
> 

Could you post emerge --info as well please?
Comment 70 mario 2007-08-17 10:22:53 UTC
of course! Here it is:


Portage 2.1.2.11 (default-linux/amd64/2006.1/server, gcc-4.1.2, glibc-2.5-r4, 2.6.18-xen x86_64)
=================================================================
System uname: 2.6.18-xen x86_64 Intel(R) Xeon(R) CPU 3070 @ 2.66GHz
Gentoo Base System release 1.12.9
Timestamp of tree: Thu, 16 Aug 2007 07:30:01 +0000
dev-lang/python:     2.4.4-r4
dev-python/pycrypto: 2.0.1-r6
sys-apps/sandbox:    1.2.17
sys-devel/autoconf:  2.13, 2.61
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10
sys-devel/binutils:  2.17
sys-devel/gcc-config: 1.3.16
sys-devel/libtool:   1.5.23b
virtual/os-headers:  2.6.21
ACCEPT_KEYWORDS="amd64"
AUTOCLEAN="yes"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -march=nocona -fomit-frame-pointer -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc"
CONFIG_PROTECT_MASK="/etc/env.d /etc/gconf /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/terminfo"
CXXFLAGS="-O2 -march=nocona -fomit-frame-pointer -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="distlocks metadata-transfer parallel-fetch sandbox sfperms strict"
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo"
LANG="de_DE@euro"
LC_ALL="de_DE@euro"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --filter=H_**/files/digest-*"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/portage/local/layman/aross /usr/portage/local/layman/php-testing /usr/portage/local/layman/php-experimental /usr/portage/local/layman/enlightenment /usr/portage/local/layman/ecatmur /usr/portage/local/layman/xen /usr/portage/local/my"
SYNC="rsync://192.168.0.1/gentoo-portage"
USE="amd64 apache2 bitmap-fonts bzip2 cli cracklib crypt dri gif iconv isdnlog jpeg mailwrapper midi mudflap nls nptl nptlonly openmp pcre perl ppds pppd python readline reflection session snmp spl ssl tiff truetype truetype-fonts type1-fonts unicode x86 xml xorg zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mulaw multi null plug rate route share shm softvol" ELIBC="glibc" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" USERLAND="GNU" VIDEO_CARDS="apm ark chips cirrus cyrix dummy fbdev glint i128 i810 mach64 mga neomagic nv r128 radeon rendition s3 s3virge savage siliconmotion sis sisusb tdfx tga trident tseng v4l vesa vga via vmware voodoo"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LDFLAGS, LINGUAS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 71 Bogdan Lipski 2007-08-17 18:40:27 UTC
Hi All, 
build of xen sources 2.6.22 from Cedric/#64 (from ubuntu) is x86-only! (have a look here at architecture: http://packages.ubuntu.com/gutsy/base/linux-image-2.6.22-9-xen) I get the same problem as mentioned by mario under amd64/x86_64, tried of course bumping up versions of software in toolchain (to unstable/masked builds) - did not help. will look for different solution. Please let me know if anybody has ideas... will post again if I find solution.

Rgds,
Bogdan

 # make
  CHK     include/linux/version.h
  CHK     include/linux/utsrelease.h
  CC      arch/x86_64/kernel/asm-offsets.s
In file included from include/linux/mm.h:40,
                 from include/linux/suspend.h:11,
                 from arch/x86_64/kernel/asm-offsets.c:12:
include/asm/mach-xen/asm/pgtable.h:490: error: 'ptep' undeclared here (not in a function)
include/asm/mach-xen/asm/pgtable.h:490: error: 'entry' undeclared here (not in a function)
include/asm/mach-xen/asm/pgtable.h:490: error: expected identifier or '(' before 'if'
include/asm/mach-xen/asm/pgtable.h:490: error: expected identifier or '(' before 'while'
include/asm/mach-xen/asm/pgtable.h:490: warning: data definition has no type or storage class
include/asm/mach-xen/asm/pgtable.h:490: warning: type defaults to 'int' in declaration of '__changed'
include/asm/mach-xen/asm/pgtable.h:490: error: expected identifier or '(' before '}' token
include/asm/mach-xen/asm/pgtable.h:490: error: expected identifier or '(' before ')' token
make[1]: *** [arch/x86_64/kernel/asm-offsets.s] Error 1
make: *** [prepare0] Error 2
Comment 72 Bogdan Lipski 2007-08-17 19:41:11 UTC
Hi All,

nailed the bastard! it was a general problem with AGP/chipset detection/handling, persistent (as it seems - did not check carefully) in all kernels from 2.6.19 to 2.6.21 - seems that problem comes to life only after upgrading to 4GB RAM (all of issues I have seen so far), but you can sleep well, there is an easy workaround for this and it's quite ok to stay with 2.6.20 from layman xen overlay. workaround is as simple as adding "agp=off" to dom0 kernel commandline, what to look for in case you find yourself in situation:
-----------------------------------------
agpgart: Detected an Intel 965G Chipset.
-----------------------------------------
so as you see i965G gets detected, although I (and all other people with this problem) have non-G version (i965P), this unfolds chain of events....
if you want to have a look at original thread with the author of agpgart
http://lkml.org/lkml/2007/6/13/40

of course you could ask yourself why not to disable agpgart during kernel compilation - well there is a dependency with IOMMU, when it is enabled then disabling AGP is not an option (only Y or M), to make it better from around 2.6.18 IOMMU is "always on" (you can not disable it), hence this sick situation.

That is all, hope this helps other people spending hard earned monnies on new shiny memory chips for xen :-)

Rgds,
Bogdan
Comment 73 Micheal Marineau (RETIRED) gentoo-dev 2007-08-27 00:00:51 UTC
xen 3.1.0 is now in portage! there are currently 2.6.18 and 2.6.20 kernels available, I'll look into newer kernels soonish.
Comment 74 mario 2007-08-27 12:41:09 UTC
Are there any information on what to do about the app-emulation/xen-tools-3.1.0 compile problem yet?

Do you need anything or can I try something out? (although I tried different stuff already without any success)
Comment 75 mario 2007-08-27 13:25:32 UTC
some more infos :-)

I tried compiling it on a amd64 desktop PC ... worked correctly here. I compared the compile output.

While the (no-VT cpu) compiles with -m64 uses the real xen computer -m32 .

I guess that is the problem... but the question now is.. how can I fix it?

The "emerge --info" looks equal (except 2006.0 desktop profile and 2006.1 server profile and using different march= option since one is intel and the other amd)
Comment 76 mario 2007-08-27 14:26:51 UTC
Me again ;-)

it seems to work when I use the following command:

XEN_TARGET_ARCH=x86_64 emerge -v xen-tools


At least it compiles fine then! I'll check later today if everything is really working.
Comment 77 Micheal Marineau (RETIRED) gentoo-dev 2007-08-27 16:59:49 UTC
(In reply to comment #76)
> Me again ;-)
> 
> it seems to work when I use the following command:
> 
> XEN_TARGET_ARCH=x86_64 emerge -v xen-tools
> 
> 
> At least it compiles fine then! I'll check later today if everything is really
> working.
> 

Sorry, forgot to look into your problem more. But according to to your emerge --info you have 'x86' in your use flags. Why would you do that? It should build fine once you remove it. The ebuild looks for the x86 and amd64 flag (which should only be set by your profile) to figgure out what XEN_TARGET_ARCH is supposed to be. When you have both then things get confused.

I was wondering why someone had added the suggestion to set XEN_TARGET_ARCH to the gentoo-wiki page, they must have also put x86 in their use flags. I'll add a check to the ebuild to die if both flags are set.
Comment 78 mario 2007-08-28 08:54:08 UTC
holy cow .. why would I do that .. yes .. I have no clue :-)

I guess I used a very old use-flag collection from another server as base! Thank you for the hint!
Comment 79 mario 2007-08-29 21:13:43 UTC
So.. next problem ;-)

While the update to xen 3.1.0 and to kernel 2.6.20 worked like charm, I now get several segmentation faults all over the day in the PV system. mysql for example crashed about 12 times today.

There is no xen related error message, but since it started after the update I strongly guess it is related to Xen.

I already upgrade to the most recent mysql version, but that did not help. 

Could this be a xen program issue, a xen kernel issue or would it help to recompile specific packages in the virtual system? Any hints are welcome :-)
Comment 80 Micheal Marineau (RETIRED) gentoo-dev 2007-08-29 21:20:36 UTC
(In reply to comment #79)
> So.. next problem ;-)
> 
> While the update to xen 3.1.0 and to kernel 2.6.20 worked like charm, I now get
> several segmentation faults all over the day in the PV system. mysql for
> example crashed about 12 times today.
> 
> There is no xen related error message, but since it started after the update I
> strongly guess it is related to Xen.
> 
> I already upgrade to the most recent mysql version, but that did not help. 
> 
> Could this be a xen program issue, a xen kernel issue or would it help to
> recompile specific packages in the virtual system? Any hints are welcome :-)
> 

Could you try the 2.6.18 kernel just to see if it is specific to the 2.6.20 kernel or not?
Comment 81 mario 2007-08-29 22:04:34 UTC
Just compiled and started it. Only the domU kernel first (or does it have to be the same version as dom0? )

I'll report back as soon as the next three segfault happen :)
Comment 82 mario 2007-08-29 22:50:36 UTC
The segmentation fault just came up again :(
Comment 83 mario 2007-08-30 16:58:34 UTC
I reverted back to xen-3.0.4 and even with the 3.1.0 domU 2.6.20 kernel, everything seems stable again now.

Later I'll try 3.0.4 with the 3.1.0 dom0 kernel .. at least I know then, if it's a kernel or an app-problem :)