32 bit Kvm running 32 bit WindowsXp hangs on reboot
Hello,
during some tests with Windows XP 32 bit using KVM-0.12.4 running on a 32 bit 2.6.32 kernel we experienced KVM hangin on reboot: VNC still shows the Windows text mode installer with the blue "Computer will be restartet" screen, but nothing happens.
The KVM process is still eating CPU time doing select()s. Using the Qemu monitor I was able to retrieve the following information:
(qemu) info registers
info registers
EAX=00000000 EBX=00000000 ECX=00000000 EDX=00000623
ESI=00000000 EDI=00000000 EBP=00000000 ESP=00000000
EIP=0000fff0 EFL=00000002 [-------] CPL=0 II=0 A20=1 SMM=0 HLT=0 ES =0000 00000000 0000ffff 00009300
CS =f000 ffff0000 0000ffff 00009b00
SS =0000 00000000 0000ffff 00009300
DS =0000 00000000 0000ffff 00009300
FS =0000 00000000 0000ffff 00009300
GS =0000 00000000 0000ffff 00009300
LDT=0000 00000000 0000ffff 00008200
TR =0000 00000000 0000ffff 00008b00
GDT= 00000000 0000ffff
IDT= 00000000 0000ffff
CR0=60000010 CR2=00000000 CR3=00000000 CR4=00000000
DR0=00000000 DR1=00000000 DR2=00000000 DR3=00000000
DR6=ffff0ff0 DR7=00000000
FCW=037f FSW=0000 [ST=0] FTW=00 MXCSR=00000000 FPR0=0000000000000000 0000 FPR1=0000000000000000 0000 FPR2=0000000000000000 0000 FPR3=0000000000000000 0000 FPR4=0000000000000000 0000 FPR5=0000000000000000 0000 FPR6=0000000000000000 0000 FPR7=0000000000000000 0000 XMM00=00000000000000000000000000000000 XMM01=00000000000000000000000000000000 XMM02=00000000000000000000000000000000 XMM03=00000000000000000000000000000000 XMM04=00000000000000000000000000000000 XMM05=00000000000000000000000000000000 XMM06=00000000000000000000000000000000 XMM07=00000000000000000000000000000000
As CS:IP=f000:fff0 points the the bios reset routine, that looks fine. The reset code also looks fine:
(qemu) x /16xb 0x000ffff0
x /16xb 0x000ffff000000000000ffff0: 0xea 0x5b 0xe0 0x00 0xf0 0x30 0x36 0x2f 00000000000ffff8: 0x32 0x33 0x2f 0x39 0x39 0x00 0xfc 0xf4
Looking at the status shows the machine to be paused:
(qemu) info status
info status
VM status: paused
But strace -p pidof kvm shows the KVM to be running.
If I do a "cont", kvm prints the following error message:
(qemu) cont
kvm: unhandled exit ffffffffkvm_run returned -22
Is this a known bug? Can somebody help?
Thank you in advance.
Philipp
Signature · 4 lines
Philipp Hahn Open Source Software Engineer [email protected] Univention GmbH Linux for Your Business fon: +49 421 22 232- 0 Mary-Somerville-Str.1 28359 Bremen fax: +49 421 22 232-99 http://www.univention.de/
Hello again,
I did some more debugging myself:
Am Freitag 06 August 2010 13:49:36 schrieb Philipp Hahn:
Quoted 1 line
[... Windows XP hangs on reboot...]
...
Quoted 4 lines
If I do a "cont", kvm prints the following error message:
(qemu) cont
kvm: unhandled exit ffffffffkvm_runreturned -22
These two lines are caused by kvm because these functions are called in this order:
qemu-kvm-0.12.4/qemu-kvm.c#kvm_cpu_exec() qemu-kvm-0.12.4/qemu-kvm.c#kvm_run() qemu-kvm-0.12.4/qemu-kvm.c#handle_unhandled()
-22 = -EINVAL == Invalid Argument
The ffffffff is from the Kernel:
linux-2.6.32.17/arch/x86/kvm/svm.c#vmrun_interception()
run->hw.hardware_exit_reason = SVM_EXIT_ERR
That line is executed because the folloing error occured previous to the line:
linux-2.6.32.17/arch/x86/kvm/svm.c#nested_svm_vmrun_msrpm() <- false linux-2.6.32.17/arch/x86/kvm/svm.c#nested_svm_map() <- NULL
To me this looks like there's a problem with the virtual memory mapping, but since I know very little about KVMs internal working, I have no idea on how to proceed. Anybody any idea?
Sincerely
Philipp
PS: As you can see from the 'svm.c', it's on an AMD Athlon(tm) II X2 250 Processor stepping 02.
Signature · 4 lines
Philipp Hahn Open Source Software Engineer [email protected] Univention GmbH Linux for Your Business fon: +49 421 22 232- 0 Mary-Somerville-Str.1 28359 Bremen fax: +49 421 22 232-99 http://www.univention.de
Re: 32 bit Kvm running 32 bit WindowsXp hangs on reboot [SOLVED]
Hello,
Am Freitag 06 August 2010 18:13:03 schrieb Philipp Hahn:
Quoted 2 lines
Quoted 2 lines
kvm: unhandled exit ffffffff
kvm_runreturned -22
FYI: Already fixed in newer Kernel (2.6.35) by
<http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=061e2fd16863009c8005b4b5fdfb75c7215c0b99>
BYtE
Philipp
Signature · 4 lines
Philipp Hahn Open Source Software Engineer [email protected] Univention GmbH Linux for Your Business fon: +49 421 22 232- 0 Mary-Somerville-Str.1 28359 Bremen fax: +49 421 22 232-99 http://www.univention.de/