You are not logged in.

#1 2010-09-13 02:36:28

danh337
Member
Registered: 2010-07-04
Posts: 18

kernel26-pae 2.6.35.4-1 can't run qemu-kvm 0.12.5-1

Hi Arch gurus,

I just upgraded a couple days ago, and now when I try to run my VMs in qemu-kvm with the kernel-pae from AUR booted, the VM takes near 100% of a CPU and never boots up because it goes so slow. If I reboot into the standard kernel 2.6.35.4-1 from base repo, then my VMs run ok again (but then I can't use all my RAM).

It's weird because the older kernel-pae (before 2.6.35) and older qemu-kvm ran all my VMs fine.  Problem is, I updated *both* the kernel *and* qemu-kvm at the same time, so I can't really say if this PAE problem is in the kernel itself or in qemu-kvm.

Any ideas on where to look or who to poke for some guidance?

Cheers,
Dan

Offline

#2 2010-09-13 03:34:23

cesura
Package Maintainer (PM)
From: Tallinn, Estonia
Registered: 2010-01-23
Posts: 1,867

Re: kernel26-pae 2.6.35.4-1 can't run qemu-kvm 0.12.5-1

Well, first try figuring out whether it is kernel26-pae or qemu-kvm first by downgrading to the packages in /var/cache/pacman/pkg, one at a time. (Such as keep kernel26-pae 2.6.35-1 and downgrade to the previous version of qemu-kvm, etc.)

Then, if you still can't find out which one it is, check dmesg for anything suspicious. smile

Last edited by cesura (2010-09-13 03:35:26)

Offline

#3 2010-09-21 23:09:52

danh337
Member
Registered: 2010-07-04
Posts: 18

Re: kernel26-pae 2.6.35.4-1 can't run qemu-kvm 0.12.5-1

itsbrad212 wrote:

Well, first try figuring out whether it is kernel26-pae or qemu-kvm first by downgrading to the packages in /var/cache/pacman/pkg, one at a time. (Such as keep kernel26-pae 2.6.35-1 and downgrade to the previous version of qemu-kvm, etc.)

Thanks very much for your reply.

Yep this is a good idea. I did it, downgrading qemu-kvm back to 0.12.4-2. And I did makepkg again for kernel-pae 2.6.35.4-1, making sure to be booted into the non-PAE kernel first. But, with the *older* qemu-kvm, and the *newer* kernel-pae, the same problem occurs.

itsbrad212 wrote:

Then, if you still can't find out which one it is, check dmesg for anything suspicious. :)

Well there's nothing changed anywhere in /var/log/ when the qemu-kvm command is run.  And dmesg doesn't seem to have any kvm compaints. For example:

$ dmesg | egrep -i 'kvm|virt'
Booting paravirtualized kernel on bare hardware
virtual kernel memory layout:
kvm: Nested Virtualization enabled
kvm: Nested Paging enabled

Here's some info about my system:

dan@danbook:~
$ uname -a
Linux danbook.danamis.com 2.6.35-pae #1 SMP PREEMPT Tue Sep 21 14:23:45 CDT 2010 i686 AMD Turion(tm) II Dual-Core Mobile M500 AuthenticAMD GNU/Linux
dan@danbook:~
$ lsmod | grep kvm
kvm_amd                32265  0 
kvm                   229919  1 kvm_amd
dan@danbook:~
$ pacman -Qs qemu
local/qemu-kvm 0.12.4-2
    Latest KVM QEMU is a generic and open source processor emulator which achieves a good emulation speed by using dynamic
    translation.
local/qemu-launcher 1.7.4-2
    GNOME/Gtk front-end for the Qemu x86 PC emulator
local/vde2 2.3.1-1
    Virtual Distributed Ethernet for emulators like qemu

It seems now that the latest kernel-pae is suspect. But the only kernel config option that should be different from the stock kernel in core is the CONFIG_HIGHMEM64G=y one.  Should I consider a bug report somewhere, in either qemu or kernel upstream? I will try the non-kvm qemu and see if it works at all. If it does, that should narrow it down to the kvm part of the kernel, yes?

Thanks to anybody with any ideas.

Last edited by danh337 (2010-09-22 00:05:56)

Offline

#4 2010-09-21 23:27:50

danh337
Member
Registered: 2010-07-04
Posts: 18

Re: kernel26-pae 2.6.35.4-1 can't run qemu-kvm 0.12.5-1

Based on my kvm+pae suspicions, I found this:
https://patchwork.kernel.org/patch/116859/

The patch may not help, according to the thread, but I will try applying it to my kernel-pae and makepkg again.

Last edited by danh337 (2010-09-21 23:37:31)

Offline

#5 2010-09-22 00:05:14

danh337
Member
Registered: 2010-07-04
Posts: 18

Re: kernel26-pae 2.6.35.4-1 can't run qemu-kvm 0.12.5-1

Hmf. I see there's already a patch-2.6.35.5-1-ARCH.bz2 file out at ftp://ftp.archlinux.org/other/kernel26/. I wonder if that would fix my problem.

Offline

#6 2010-09-23 00:40:24

danh337
Member
Registered: 2010-07-04
Posts: 18

Re: kernel26-pae 2.6.35.4-1 can't run qemu-kvm 0.12.5-1

Still no joy. I'm now running kernel26-pae 2.6.35.5-1, from a hacked PKGBUILD and the latest patch file mentioned above.

I dumped qemu-kvm package, and installed plain qemu 0.12.5-1.

To sum up:

  • If I boot the kernel-pae,

    • qemu without -enable-kvm option works.

    • but qemu with -enable-kvm hangs at 100% cpu with a blinking cursor on the guest screen.

  • If I boot plain kernel (NON PAE),

    • With or without -enable-kvm option works fine.

  • Once again, this ALL worked fine BEFORE I updated my kernel to the latest version, less than 2 weeks ago.

Here's the command I can use which works in either non-PAE or PAE mode:

qemu -boot c -m 1024 -hda '/home/dan/l/var/qemu/WindXpWork.img' -cdrom '/dev/cdrom' -localtime -net nic,vlan=0,model=rtl8139 -net user,vlan=0

IF I add the -enable-kvm option in PAE mode, then it does not work.

Google hasn't helped me on this. Am I really the only guy on Earth trying to use this version of kernel-pae and qemu? Can anybody at least point me in the direction of the right folks to test this and submit bugs if needed?  I'm trying to recommend Arch as the distro of choice where I work, but this issue is seriously killing my case.

Regards.

Offline

#7 2010-09-23 00:47:19

Allan
Pacman
From: Brisbane, AU
Registered: 2007-06-09
Posts: 11,405
Website

Re: kernel26-pae 2.6.35.4-1 can't run qemu-kvm 0.12.5-1

Have you tried just rebuilding qemu after you are running kernel26-pae?  Maybe it picks something up at compile time which you have changed due to changing kernels?

Offline

#8 2010-09-23 00:58:38

danh337
Member
Registered: 2010-07-04
Posts: 18

Re: kernel26-pae 2.6.35.4-1 can't run qemu-kvm 0.12.5-1

Allan wrote:

Have you tried just rebuilding qemu after you are running kernel26-pae?  Maybe it picks something up at compile time which you have changed due to changing kernels?

Thanks for the reply. I never have actually built qemu from source. I just installed it with pacman -S qemu.  I have reinstalled (-R then -S) the package booted from both kernel and kernel-pae, but results are same.

Offline

#9 2010-09-23 01:00:58

Allan
Pacman
From: Brisbane, AU
Registered: 2007-06-09
Posts: 11,405
Website

Re: kernel26-pae 2.6.35.4-1 can't run qemu-kvm 0.12.5-1

Well, do you want to try rebuilding it from source while the pae kernel is running...   just grab the PKGBUILD from ABS and run makepkg.

Offline

#10 2010-09-23 02:26:07

danh337
Member
Registered: 2010-07-04
Posts: 18

Re: kernel26-pae 2.6.35.4-1 can't run qemu-kvm 0.12.5-1

Got it. I just did it, while booted in kernel-pae, and the exact same symptoms occur.

I think this is looking like it's not qemu's fault. I think something in the kvm code of the kernel is busted in PAE mode. I'll try to followup at kernel.org and put what I find here.

Offline

#11 2010-09-23 03:06:55

Allan
Pacman
From: Brisbane, AU
Registered: 2007-06-09
Posts: 11,405
Website

Re: kernel26-pae 2.6.35.4-1 can't run qemu-kvm 0.12.5-1

I'd also rebuild your PAE kernel with just the pae option disabled to double check that the cause is enabling that option.

Offline

#12 2010-09-25 08:17:41

homan
Member
Registered: 2010-09-25
Posts: 1

Re: kernel26-pae 2.6.35.4-1 can't run qemu-kvm 0.12.5-1

confirm
kvm does not work with PAE kernel (2.6.35.5).  kernel26 works fine. Rebuilding with "CONFIG_HIGHMEM64G=y" and "CONFIG_HIGHMEM=y" does not.

Offline

#13 2010-12-20 01:31:33

danh337
Member
Registered: 2010-07-04
Posts: 18

Re: kernel26-pae 2.6.35.4-1 can't run qemu-kvm 0.12.5-1

Just about had it with this bug. Here's what I just submitted to kernel guys. We'll see.
https://bugzilla.kernel.org/show_bug.cgi?id=25262

Offline

#14 2010-12-28 05:27:06

danh337
Member
Registered: 2010-07-04
Posts: 18

Re: kernel26-pae 2.6.35.4-1 can't run qemu-kvm 0.12.5-1

Good news from the bug report above. Too bad it's taking 3 months for the fix to come around.


Comment #2 From Avi Kivity 2010-12-26 08:50:39 (-) [reply] -------

2.6.37-rc7 good, 2.6.36.2 bad

Last edited by danh337 (2010-12-28 05:29:30)

Offline

#15 2011-02-01 18:28:56

danh337
Member
Registered: 2010-07-04
Posts: 18

Re: kernel26-pae 2.6.35.4-1 can't run qemu-kvm 0.12.5-1

Finally this issue is resolved:  kernel 2.6.37 fixes it.

Offline

Board footer

Powered by FluxBB