Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 187812 - load/runtime issues with kvm-amd on kernels >=2.6.22
Summary: load/runtime issues with kvm-amd on kernels >=2.6.22
Status: RESOLVED OBSOLETE
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo Kernel Bug Wranglers and Kernel Maintainers
URL: http://bugzilla.kernel.org/show_bug.c...
Whiteboard: watch-linux-bugzilla
Keywords:
Depends on:
Blocks:
 
Reported: 2007-08-05 14:03 UTC by Marius Mauch (RETIRED)
Modified: 2011-06-28 09:51 UTC (History)
1 user (show)

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


Attachments
stacktrace of `modprobe kvm-amd` on gentoo-sources-2.6.22-r2 (modprobe-kvm-amd.dump,2.35 KB, text/plain)
2007-08-05 14:04 UTC, Marius Mauch (RETIRED)
Details
.config of gentoo-sources-2.6.22-r2 (gentoo-sources-2.6.22-r2.config,43.23 KB, text/plain)
2007-08-05 14:05 UTC, Marius Mauch (RETIRED)
Details
KVM: SVM: Reliably detect if SVM was disabled by BIOS (kvm_svm.patch,1.55 KB, patch)
2007-08-05 15:07 UTC, Mike Pagano
Details | Diff
Stacktrace with a bit more information (modprobe-kvm-amd.dump,1.70 KB, text/plain)
2007-08-05 16:05 UTC, Marius Mauch (RETIRED)
Details
.config of vanilla.sources-2.6.23_rc2 (.config,42.34 KB, text/plain)
2007-08-06 06:50 UTC, Marius Mauch (RETIRED)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Marius Mauch (RETIRED) gentoo-dev 2007-08-05 14:03:23 UTC
With gentoo-sources-2.6.22-r2 and vanilla-sources-2.6.22.1 I get the attached stacktrace when trying to modprobe kvm-amd.ko. I don't get it with vanilla-sources-2.6.23_rc2.

When I compile it into the kernel on gentoo-sources-2.6.22-r2 (or with the module on vanilla-sources-2.6.23_rc2) I don't get an OOPS, but it doesn't work properly either, namely when I start qemu (with kvm support) the VM starts to load, but at some point hangs with 100% cpu usage in kernel space.

Haven't checked on lower versions as the KVM userspace API changed with 2.6.22, so the problem might exist there too.

$ emerge --info
Portage 2.1.3.2 (default-linux/amd64/2007.0/no-multilib, gcc-4.1.2, glibc-2.6-r0, 2.6.22-gentoo-r2 x86_64)
=================================================================
System uname: 2.6.22-gentoo-r2 x86_64 AMD Athlon(tm) 64 X2 Dual Core Processor 4600+
Gentoo Base System release 1.12.10
Timestamp of tree: Sun, 05 Aug 2007 02:29:01 +0000
dev-java/java-config: 1.3.7, 2.0.33-r1
dev-lang/python:     2.4.4-r4, 2.5.1-r2
dev-python/pycrypto: 2.0.1-r6
sys-apps/sandbox:    1.2.18.1
sys-devel/autoconf:  2.13, 2.61-r1
sys-devel/automake:  1.4_p6, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10
sys-devel/binutils:  2.17-r1
sys-devel/gcc-config: 1.3.16
sys-devel/libtool:   1.5.24
virtual/os-headers:  2.6.22-r2
ACCEPT_KEYWORDS="amd64 ~amd64"
AUTOCLEAN="yes"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe -ftracer -fweb -frename-registers -march=athlon64"
CHOST="x86_64-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 -pipe -ftracer -fweb -frename-registers -march=athlon64"
DISTDIR="/srv/portage/distfiles"
FEATURES="collision-protect distlocks metadata-transfer preserve-libs sandbox sfperms sign strict unmerge-orphans userfetch userpriv usersandbox"
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo"
LINGUAS="en en_US en_GB de de_DE"
MAKEOPTS="-s -j4 -l3.0"
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="/srv/portage/porttree"
PORTDIR_OVERLAY="/srv/portage/testing /srv/portage/overlay"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="3dnow 3dnowext X a52 aac acl alsa amd64 bash-completion berkdb bitmap-fonts bzip2 cairo caps cdr chroot cli cracklib crypt cups d dri dvd dvdnav dvdr dvdread encode exif fbcon gcj gdbm gif glitz gpm gtk iconv imap ipv6 isdnlog jpeg jpeg2k ldap libg++ mad midi mmx mp2 mp3 mudflap ncurses nfs nptl nptlonly ogg opengl openmp pam pcre pdf png pppd python quicktime readline reflection rtc samba sdl session smp spl sse sse2 ssl svg tiff truetype truetype-fonts type1-fonts unicode v4l v4l2 vorbis xattr xcb xcomposite xface xml xorg xv xvid xvmc zlib" ALSA_CARDS="hda-intel intel8x0 bt87x" 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="en en_US en_GB de de_DE" USERLAND="GNU" VIDEO_CARDS="nv nvidia vga vesa fbdev v4l"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Marius Mauch (RETIRED) gentoo-dev 2007-08-05 14:04:03 UTC
Created attachment 126942 [details]
stacktrace of `modprobe kvm-amd` on gentoo-sources-2.6.22-r2
Comment 2 Marius Mauch (RETIRED) gentoo-dev 2007-08-05 14:05:46 UTC
Created attachment 126943 [details]
.config of gentoo-sources-2.6.22-r2

stacktrace was from the same kernel, except that kvm-intel and kvm-amd were compiled as modules.
Comment 3 Marius Mauch (RETIRED) gentoo-dev 2007-08-05 14:07:00 UTC
Let me know if you need any more information or want me test anything specific.
Comment 4 Nelson 2007-08-05 14:46:24 UTC
Have you checked the 2.6.23-rc2/1 changelog?
http://www.kernel.org/pub/linux/kernel/v2.6/testing/ChangeLog-2.6.23-rc2

It fixes many bugs related to kvm, should be one of them. If so, I take from [1] that you'll have to wait for the gentoo-sources 2.6.23, since it's clearly a vanilla problem and was fixed, but better leave this open untill it comes out.

Thanks for submitting

[1] http://www.gentoo.org/proj/en/kernel/maintenance.xml
Comment 5 Mike Pagano gentoo-dev 2007-08-05 15:05:51 UTC
Here's some information I found that might be related.

Discussion on mailing list which appears to be about the issue:
http://www.mail-archive.com/kvm-devel@lists.sourceforge.net/msg03959.html

Patch post to Mailing List for above
http://www.uwsg.iu.edu/hypermail/linux/kernel/0706.2/2447.html

Commit of above patch
6031a61c2ef4cf22b69ef5494aefa54b84a27d2f

I was able to apply the commit patch I will attach to gentoo-sources-2.6.22-r2 and compile using your .config but I don't have the hardware to test.

Would you be to apply the patch and test?

Comment 6 Mike Pagano gentoo-dev 2007-08-05 15:07:32 UTC
Created attachment 126962 [details, diff]
KVM: SVM: Reliably detect if SVM was disabled by BIOS
Comment 7 Mike Pagano gentoo-dev 2007-08-05 15:22:22 UTC
Sorry for the bugspam, it might be helpful to have CONFIG_DEBUG_KERNEL set if the failure repeats itself.
Comment 8 Daniel Drake (RETIRED) gentoo-dev 2007-08-05 15:30:09 UTC
Nelson: if bugs are fixed upstream in development kernels, we'll usually attempt to backport the fix. Waiting for the next kernel release is somewhat a last resort...
Comment 9 Nelson 2007-08-05 15:46:11 UTC
(In reply to comment #8)
Thanks, could you add that to the guide? Like, what qualifies for a patch or not.

I just deduced this from:
>(...)deviate away from the upstream kernel releases as little as possible: we aim
>to make genpatches as small as possible. The less patches we have to 
>handle/backport/forwardport, the less work we have on our hands.
Comment 10 Marius Mauch (RETIRED) gentoo-dev 2007-08-05 16:04:24 UTC
(In reply to comment #5)
> I was able to apply the commit patch I will attach to gentoo-sources-2.6.22-r2
> and compile using your .config but I don't have the hardware to test.
> 
> Would you be to apply the patch and test?

Thanks, but that patch didn't change anything (also kvm used to work on this system with 2.6.19, so I doubt that it's BIOS related).
And thanks for the pointer to CONFIG_DEBUG_KERNEL, that made the trace a bit more useful.
Comment 11 Marius Mauch (RETIRED) gentoo-dev 2007-08-05 16:05:17 UTC
Created attachment 126967 [details]
Stacktrace with a bit more information
Comment 12 Daniel Drake (RETIRED) gentoo-dev 2007-08-05 21:11:49 UTC
Please post your 2.6.23 .config
Comment 13 Marius Mauch (RETIRED) gentoo-dev 2007-08-06 06:50:57 UTC
Created attachment 127037 [details]
.config of vanilla.sources-2.6.23_rc2
Comment 14 Mike Pagano gentoo-dev 2007-08-06 14:25:59 UTC
ok, to sum up, there's two things here.

Getting an oops when building as a module and then the cpu usage error.

Speaking with dsd, since the CPU usage also exists in the development kernel, he would like you to report the cpu usage error upstream and then copy the URL on this bug.

It does appear the module error was fixed in 2.6.23 and we would like to backport that fix. We would appreciate if you could test a forthcoming patch for that.



Comment 15 Marius Mauch (RETIRED) gentoo-dev 2007-08-16 14:46:17 UTC
This has been reported as http://bugzilla.kernel.org/show_bug.cgi?id=8894
Comment 16 Daniel Drake (RETIRED) gentoo-dev 2007-08-30 15:26:58 UTC
Thanks, will watch upstream bug