Core2Duo and KVM may not boot Win8 properly on 3.x kernels

Bug #1366836 reported by Erik Rull
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
QEMU
Fix Released
Undecided
Unassigned

Bug Description

When I start up QEMU w/ KVM 1.7.0 on a Core2Duo machine running a vanilla kernel 3.4.67 or 3.10.12 to run a Windows 8.0 guest, the guest freezes at Windows 8 boot without any error.
When I dump the CPU registers via "info registers", nothing changes, that means the system really stalled. Same happens with QEMU 2.0.0 and QEMU 2.1.0.
It stalls when the Windows logo is displayed and the balled circle starts rotating.

But - when I run the very same guest using Kernel 2.6.32.12 and QEMU 1.7.0 or 2.0.0 on the host side it works on the Core2Duo. Also the system above but just with an i3 or i5 CPU it works fine.

I already disabled networking and USB for the guest and changed the graphics
card - no effect. I assume that some mean bits and bytes have to be set up
properly to get the thing running.

Seems to be related to a kvm/processor incompatibility.

Windows XP runs on all combinations without any issues. Windows 8.1 guests have the same issues as Windows 8.0.

An example command line that does not boot Windows 8 is:
qemu-system-x86_64 -machine pc-i440fx-1.5,accel=kvm,kernel_irqchip=off -daemonize -cpu kvm32,+sep,+nx -nodefaults -vga std -readconfig /usr/X11R6/X11etc/ich9-ehci-uhci.cfg -device usb-host,bus=ehci.0,hostport=1.2 -device usb-tablet -drive file=/dev/sdb,cache=writethrough,if=none,id=x -device ide-drive,drive=x -m 1024 -monitor telnet:127.0.0.1:5100,nowait,server -vnc :1 -L /usr/X11R6/share/qemu -boot c -localtime -enable-kvm -no-shutdown

enabling the kernel_irqchip, removing the sep, disabling usb, changing the machine type or changing the monitor type (SDL or VNC) has no effect.

Tags: core2duo kvm
Erik Rull (erik-rull)
description: updated
description: updated
Erik Rull (erik-rull)
description: updated
Erik Rull (erik-rull)
description: updated
Revision history for this message
Erik Rull (erik-rull) wrote :

Here the register dump of the stalled Win8
QEMU 2.1.0 monitor - type 'help' for more information
(qemu) info registers
EAX=3e2009e3 EBX=3e2009e3 ECX=80000000 EDX=80000000
ESI=3e2009e3 EDI=8220c108 EBP=81f9b33c ESP=81f9b2f0
EIP=80c98d83 EFL=00010282 [--S----] CPL=0 II=0 A20=1 SMM=0 HLT=0
ES =0023 00000000 ffffffff 00c0f300 DPL=3 DS [-WA]
CS =0008 00000000 ffffffff 00c09b00 DPL=0 CS32 [-RA]
SS =0010 00000000 ffffffff 00c09300 DPL=0 DS [-WA]
DS =0023 00000000 ffffffff 00c0f300 DPL=3 DS [-WA]
FS =0030 80e65000 00004280 00409300 DPL=0 DS [-WA]
GS =0000 00000000 ffffffff 00000000
LDT=0000 00000000 ffffffff 00000000
TR =0028 80353000 000020ab 00008b00 DPL=0 TSS32-busy
GDT= 80a37000 000003ff
IDT= 80a37400 000007ff
CR0=8001003b CR2=8b206090 CR3=00185000 CR4=000406e9
DR0=0000000000000000 DR1=0000000000000000 DR2=0000000500000000 DR3=0000000000000000
DR6=00000000ffff0ff0 DR7=0000000000000400
EFER=0000000000000800
FCW=027f FSW=0000 [ST=0] FTW=00 MXCSR=00001f80
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

Revision history for this message
Erik Rull (erik-rull) wrote :

I found a new trace - using the ipipe patch that I have, there seems to be an issue in the 3.4 kernels, but as it looks also in the 3.10 kernels.
http://www.xenomai.org/pipermail/xenomai/2013-March/027865.html

Is there an update on that already existing? It was not completely clear if this issue is related either to KVM or to the ipipe patch.

Thanks.

Revision history for this message
Erik Rull (erik-rull) wrote :

attached the trace.dat (tar-gzipped) as recommended. Hope this helps finding the issue. The file should capture the following:
- windows 8 with screen that shows that the last boot attempts failed
- issued system_reset on qemu commandline
- startup of windows 8 that stalls

Revision history for this message
Erik Rull (erik-rull) wrote :

sorry for the corrupt file, this one should be fine now.

Revision history for this message
Erik Rull (erik-rull) wrote :

Confirmed - the current kvm.git without any ipipe patch also causes the issue. Trace File attached.

Revision history for this message
Thomas Huth (th-huth) wrote :

Triaging old bug tickets... can you still reproduce this issue with the latest version of QEMU? Or could we close this ticket nowadays?

Changed in qemu:
status: New → Incomplete
Revision history for this message
Erik Rull (erik-rull) wrote :

Please close it, it's solved with this patch commit to kvm / kernel:
Was found and fixed with great support of Paolo Bonzini

From: Paolo Bonzini
Date: Thu, 12 Feb 2015 17:04:47 +0100
Subject: KVM: emulate: fix CMPXCHG8B on 32-bit hosts

Thomas Huth (th-huth)
Changed in qemu:
status: Incomplete → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.