The first time I run qemu with kqemu on a 2.6.26 o 2.6.27 series kernel it seg faults, the second time I run it it hangs and I get a dead window that I can't get rid of. The system keeps running ok but hangs when shutting down so I have to power off. If it's relevant I'm running a Windows 2000 image. Reproducible: Always Steps to Reproduce: 1.Boot up a 2.6.26 or 2.6.27 kernel 2.Recompile and modprobe kqemu 3.Run qemu on a image. WORKAROUND: Recompile kqemu with gcc 3.4.6 and it works fine. Compile with 4.1.2 and it hangs every time. Maybe enforce compiling with 3.4.6 or add a warning. Compiling with 4.1.2 works fine with 2.6.25 or earlier kernels. I'm running a x86 linux on an AMD Athlon64. See /proc/cpuinfo processor : 0 vendor_id : AuthenticAMD cpu family : 15 model : 47 model name : AMD Athlon(tm) 64 Processor 3200+ stepping : 2 cpu MHz : 1000.000 cache size : 512 KB fdiv_bug : no hlt_bug : no f00f_bug : no coma_bug : no fpu : yes fpu_exception : yes cpuid level : 1 wp : yes flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 syscall nx mmxext fxsr_opt lm 3dnowext 3dnow pni lahf_lm bogomips : 2009.20 clflush size : 64 power management: ts fid vid ttp tm stc I've disabled all the virtualization and paravirtualization options in the kernel.
emerge --info Portage 2.1.6.4 (default/linux/x86/2008.0, gcc-4.1.2, glibc-2.6.1-r0, 2.6.27-gentoo-r8 i686) ================================================================= System uname: Linux-2.6.27-gentoo-r8-i686-AMD_Athlon-tm-_64_Processor_3200+-with-glibc2.0 Timestamp of tree: Wed, 28 Jan 2009 13:15:01 +0000 ccache version 2.4 [enabled] app-shells/bash: 3.2_p39 dev-java/java-config: 1.3.7-r1, 2.1.6-r1 dev-lang/python: 2.5.2-r7 dev-util/ccache: 2.4-r7 dev-util/cmake: 2.4.8 sys-apps/baselayout: 1.12.11.1 sys-apps/sandbox: 1.2.18.1-r2 sys-devel/autoconf: 2.13, 2.63 sys-devel/automake: 1.4_p6, 1.5, 1.7.9-r1, 1.9.6-r2, 1.10.2 sys-devel/binutils: 2.18-r3 sys-devel/gcc-config: 1.4.0-r4 sys-devel/libtool: 1.5.26 virtual/os-headers: 2.6.27-r2 ACCEPT_KEYWORDS="x86" CBUILD="i686-pc-linux-gnu" CFLAGS="-O2 -march=athlon-xp -pipe" CHOST="i686-pc-linux-gnu" CONFIG_PROTECT="/etc /var/bind /var/lib/hsqldb" CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/terminfo /etc/udev/rules.d" CXXFLAGS="-O2 -march=athlon-xp -pipe" DISTDIR="/usr/portage/distfiles" FEATURES="ccache distlocks fixpackages parallel-fetch protect-owned sandbox sfperms strict unmerge-orphans userfetch" GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo" LDFLAGS="-Wl,-O1" LINGUAS="en_GB en uk" PKGDIR="/usr/portage/packages" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/portage" SYNC="rsync://rsync.uk.gentoo.org/gentoo-portage" USE="X acl acpi alsa berkdb bzip2 cli cracklib crypt cups dbus dri dvdr fam fat foomaticdb fortran gdbm gif glibc-omitfp gpm gtk hal iconv isdnlog java jpeg kqemu ldap midi mmx mng mudflap ncurses nls nptl nptlonly nsplugin ntfs ogg opengl openmp pam pch pcre perl png ppds pppd python quicktime readline reflection reiserfs sdl session spl ssl startup-notification sysfs tcpd unicode usb vorbis win32codecs x86 xml xorg zlib" ALSA_CARDS="emu10k1" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en_GB en uk" USERLAND="GNU" VIDEO_CARDS="vesa fbdev nv" Unset: CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LANG, LC_ALL, MAKEOPTS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Just to be clear qemu always works without kqemu
Could notify upstream about this issue? the best workaround right now is using kvm or prod me to provide an updated qemu snapshot.
I had the same problem, and found a quick fix for it here: <http://qemu-forum.ipi.fi/viewtopic.php?f=16&t=4572#p14019>. I turned this into a "permanent" solution by adding to a local portage overlay a patch file and a modified kqemu-1.3.0_pre11.ebuild file (I just added a line for the new patch). I'll attach those two files here. The problem is still present in kqemu-1.4.0_pre1, and I used the same solution successfully.
Created attachment 186833 [details, diff] app-emulation/kqemu/files/kqemu-1.3.0_pre11-kernel_c.patch
Created attachment 186834 [details] app-emulation/kqemu/kqemu-1.3.0_pre11.ebuild
Still valid with 1.4.0_pre1-r1?