Skip to contentSkip to conversation

Windows7 crashes inside the VM when starting a certain program

DISCUSSION André Weidemann 5 participants 18 messages Jul 7, 2011 – Jul 31, 2011 KVM

lore
Share & tools
lore
#0 lore raw

Hi,
I am running Windows7 x64 in a VM which crashes after starting a certain game. Actually there are two games both from the same company, that make the VM crash after starting them.
Windows crashes right after starting the game. With the 1st game the screen goes black as usual and the cursor keeps spinning for 3-5 seconds until Windows crashes. With the second game I get to 3D the login screen. The game then crashes after logging in. Windows displays this error message on the first crash:
http://pastebin.com/kMzk9Jif
Windows then finishes writing the crash dump and restarts.
I can reproduce Windows crashing every time I start the game while the VM keeps running without any problems.
When Windows reboots after the first crash and the game is started again, the message on the following blue screen changes slightly and stays the same(except for the addresses) for every following crash:
http://pastebin.com/jVtBc4ZH

I first thought that this might be related to a certain feature in 3D acceleration being used, but Futuremark 3DMark Vantage or 3DMark 11 run without any problems. They run a bit choppy on some occasions, but do that without crashing Windows7 or the VM.

How can I proceed to investigate what is going wrong?

I am using a qemu-kvm git clone from a few days ago (d58931037dbb4fbc2fbb33858629d3fabfd1b0d4).

This is my command line:
/usr/local/bin/qemu-system-x86_64 -boot order=ncd -cpu host -vnc 192.168.3.1:0 -k de -smp 2,cores=1,threads=2,sockets=1 -drive file=/mnt/ntfs/Windows7_120G.img,if=ide,index=0,cache=writeback -m 4096 -drive file=/dev/cdrom1,if=ide,index=3,media=cdrom,cache=none -device pci-assign,host=03:00.0,id=radeon6950,addr=0x11 -net nic,model=e1000,macaddr=DE:AD:BE:EF:42:42 -net tap,script=/usr/local/bin/qemu-ifup -rtc base=localtime -parallel none -soundhw hda -usb -device usb-ehci,id=ehci -usbdevice host:045e:00f9 -chardev stdio,id=seabios -device isa-debugcon,iobase=0x402,chardev=seabios -watchdog ib700 -watchdog-action debug -monitor telnet:127.0.0.1:11111,server,nowait,nodelay

Regards
André

#1 lore raw
Quoted 18 lines · André Weidemann

Hi,
I am running Windows7 x64 in a VM which crashes after starting a certain game. Actually there are two games both from the same company, that make the VM crash after starting them.
Windows crashes right after starting the game. With the 1st game the screen goes black as usual and the cursor keeps spinning for 3-5 seconds until Windows crashes. With the second game I get to 3D the login screen. The game then crashes after logging in.
Windows displays this error message on the first crash:
http://pastebin.com/kMzk9Jif
Windows then finishes writing the crash dump and restarts.
I can reproduce Windows crashing every time I start the game while the VM keeps running without any problems.
When Windows reboots after the first crash and the game is started again, the message on the following blue screen changes slightly and stays the same(except for the addresses) for every following crash:
http://pastebin.com/jVtBc4ZH

Quoted 6 lines

I first thought that this might be related to a certain feature in 3D acceleration being used, but Futuremark 3DMark Vantage or 3DMark 11 run without any problems. They run a bit choppy on some occasions, but do that without crashing Windows7 or the VM.

How can I proceed to investigate what is going wrong?

I did some testing and found out that Windows7 does not crash anymore when changing "-cpu host" to "-cpu Nehalem". After doing so, the "only" thing crashing, is the application itself. Why is that? What is different between the "real" CPU and the one provided by qemu-kvm? How can "-cpu host" cause Windows7 to crash, while "-cpu Nehalem" "only" crashes the application.

I then had WinDbg attach to the process in question. When the game crashes the debugger reports an Assertion Failure. This seems so happen as soon as the game accesses the network through a certain DLL. To exclude the emulated e1000 hardware as the cause, I removed it from the VM and passed an Intel network card 82574L to it using these lines:

-device pci-assign,host=04:00.0,id=82574L,addr=0x10 \
-net none \

The network card works under Windows7, but the problem of the crashing game remains.

Any ideas on how to track the problem are greatly appreciated.

Regards
André

#2 lore raw
Quoted 42 lines · André Weidemann
Quoted 18 lines · André Weidemann

Hi,
I am running Windows7 x64 in a VM which crashes after starting a certain game. Actually there are two games both from the same company, that make the VM crash after starting them.
Windows crashes right after starting the game. With the 1st game the screen goes black as usual and the cursor keeps spinning for 3-5 seconds until Windows crashes. With the second game I get to 3D the login screen. The game then crashes after logging in.
Windows displays this error message on the first crash:
http://pastebin.com/kMzk9Jif
Windows then finishes writing the crash dump and restarts.
I can reproduce Windows crashing every time I start the game while the VM keeps running without any problems.
When Windows reboots after the first crash and the game is started again, the message on the following blue screen changes slightly and stays the same(except for the addresses) for every following crash:
http://pastebin.com/jVtBc4ZH

Quoted 6 lines

I first thought that this might be related to a certain feature in 3D acceleration being used, but Futuremark 3DMark Vantage or 3DMark 11 run without any problems. They run a bit choppy on some occasions, but do that without crashing Windows7 or the VM.

How can I proceed to investigate what is going wrong?

I did some testing and found out that Windows7 does not crash anymore when changing "-cpu host" to "-cpu Nehalem". After doing so, the "only" thing crashing, is the application itself.
Why is that? What is different between the "real" CPU and the one provided by qemu-kvm? How can "-cpu host" cause Windows7 to crash, while "-cpu Nehalem" "only" crashes the application.

I then had WinDbg attach to the process in question. When the game crashes the debugger reports an Assertion Failure. This seems so happen as soon as the game accesses the network through a certain DLL. To exclude the emulated e1000 hardware as the cause, I removed it from the VM and passed an Intel network card 82574L to it using these lines:

(quoted diff) +0 -2
-device pci-assign,host=04:00.0,id=82574L,addr=0x10 \
-net none \
Quoted 4 lines

The network card works under Windows7, but the problem of the crashing game remains.

Any ideas on how to track the problem are greatly appreciated.

I faced problems more than once when the host used MSIs for an assigned device while the guest driver decided it's better to stick with legacy INTx (check the IRQ number under Windows, > 0 means INTx, < 0 MSI). You can exclude this by adding prefer_msi=off to the pci-assign options. May require disabling some host devices in case of IRQ conflict (yeah, we still need to solve that...).

Jan

#3 lore raw
In reply to André Weidemann
Quoted 24 lines · André Weidemann
Quoted 23 lines · André Weidemann

Hi,
I am running Windows7 x64 in a VM which crashes after starting a certain game. Actually there are two games both from the same company, that make the VM crash after starting them.
Windows crashes right after starting the game. With the 1st game the screen goes black as usual and the cursor keeps spinning for 3-5 seconds until Windows crashes. With the second game I get to 3D the login screen. The game then crashes after logging in.
Windows displays this error message on the first crash:
http://pastebin.com/kMzk9Jif
Windows then finishes writing the crash dump and restarts.
I can reproduce Windows crashing every time I start the game while the VM keeps running without any problems.
When Windows reboots after the first crash and the game is started again, the message on the following blue screen changes slightly and stays the same(except for the addresses) for every following crash:
http://pastebin.com/jVtBc4ZH

I first thought that this might be related to a certain feature in 3D acceleration being used, but Futuremark 3DMark Vantage or 3DMark 11 run without any problems. They run a bit choppy on some occasions, but do that without crashing Windows7 or the VM.

Quoted 4 lines
Quoted 1 line

How can I proceed to investigate what is going wrong?

I did some testing and found out that Windows7 does not crash anymore when changing "-cpu host" to "-cpu Nehalem". After doing so,

What is your host cpu (cat /proc/cpuinfo)?

Quoted 22 lines

the "only" thing crashing, is the application itself. Why is that? What is different between the "real" CPU and the one provided by qemu-kvm? How can "-cpu host" cause Windows7 to crash, while "-cpu Nehalem" "only" crashes the application.

I then had WinDbg attach to the process in question. When the game crashes the debugger reports an Assertion Failure. This seems so happen as soon as the game accesses the network through a certain DLL.
To exclude the emulated e1000 hardware as the cause, I removed it from the VM and passed an Intel network card 82574L to it using these lines:

(quoted diff) +0 -2
-device pci-assign,host=04:00.0,id=82574L,addr=0x10 \
-net none \

The network card works under Windows7, but the problem of the crashing game remains.

Any ideas on how to track the problem are greatly appreciated.

Quoted 6 lines

Regards
André
--
To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

--
Gleb.

#4 lore raw

Hi,

Quoted 25 lines · Gleb Natapov
Quoted 24 lines · André Weidemann
Quoted 23 lines · André Weidemann

Hi,
I am running Windows7 x64 in a VM which crashes after starting a certain game. Actually there are two games both from the same company, that make the VM crash after starting them.
Windows crashes right after starting the game. With the 1st game the screen goes black as usual and the cursor keeps spinning for 3-5 seconds until Windows crashes. With the second game I get to 3D the login screen. The game then crashes after logging in.
Windows displays this error message on the first crash:
http://pastebin.com/kMzk9Jif
Windows then finishes writing the crash dump and restarts.
I can reproduce Windows crashing every time I start the game while the VM keeps running without any problems.
When Windows reboots after the first crash and the game is started again, the message on the following blue screen changes slightly and stays the same(except for the addresses) for every following crash:
http://pastebin.com/jVtBc4ZH

I first thought that this might be related to a certain feature in 3D acceleration being used, but Futuremark 3DMark Vantage or 3DMark 11 run without any problems. They run a bit choppy on some occasions, but do that without crashing Windows7 or the VM.

Quoted 5 lines
Quoted 4 lines
Quoted 1 line

How can I proceed to investigate what is going wrong?

I did some testing and found out that Windows7 does not crash anymore when changing "-cpu host" to "-cpu Nehalem". After doing so,

What is your host cpu (cat /proc/cpuinfo)?

The server is currently running on 2 out of 8 cores with kernel boot parameter "maxcpus=2".

processor : 0
vendor_id : GenuineIntel
cpu family : 6
model : 26
model name : Intel(R) Core(TM) i7 CPU 920 @ 2.67GHz
stepping : 5
cpu MHz : 1596.000
cache size : 8192 KB
physical id : 0
siblings : 2
core id : 0
cpu cores : 2
apicid : 0
initial apicid : 0
fpu : yes
fpu_exception : yes
cpuid level : 11
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx rdtscp lm constant_tsc arch_perfmon pebs bts rep_good xtopology nonstop_tsc aperfmperf pni dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm sse4_1 sse4_2 popcnt lahf_lm ida tpr_shadow vnmi flexpriority ept vpid
bogomips : 5405.59
clflush size : 64
cache_alignment : 64
address sizes : 36 bits physical, 48 bits virtual
power management:

processor : 1
vendor_id : GenuineIntel
cpu family : 6
model : 26
model name : Intel(R) Core(TM) i7 CPU 920 @ 2.67GHz
stepping : 5
cpu MHz : 1596.000
cache size : 8192 KB
physical id : 0
siblings : 2
core id : 1
cpu cores : 2
apicid : 2
initial apicid : 2
fpu : yes
fpu_exception : yes
cpuid level : 11
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx rdtscp lm constant_tsc arch_perfmon pebs bts rep_good xtopology nonstop_tsc aperfmperf pni dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm sse4_1 sse4_2 popcnt lahf_lm ida tpr_shadow vnmi flexpriority ept vpid
bogomips : 5404.84
clflush size : 64
cache_alignment : 64
address sizes : 36 bits physical, 48 bits virtual
power management:

Quoted 22 lines
Quoted 22 lines

the "only" thing crashing, is the application itself. Why is that? What is different between the "real" CPU and the one provided by qemu-kvm? How can "-cpu host" cause Windows7 to crash, while "-cpu Nehalem" "only" crashes the application.

I then had WinDbg attach to the process in question. When the game crashes the debugger reports an Assertion Failure. This seems so happen as soon as the game accesses the network through a certain DLL.
To exclude the emulated e1000 hardware as the cause, I removed it from the VM and passed an Intel network card 82574L to it using these lines:

(quoted diff) +0 -2
-device pci-assign,host=04:00.0,id=82574L,addr=0x10 \
-net none \

The network card works under Windows7, but the problem of the crashing game remains.

Any ideas on how to track the problem are greatly appreciated.

Quoted 9 lines
Quoted 6 lines

Regards
André
--
To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

--
Gleb.

André

#5 lore raw
Quoted 37 lines · André Weidemann

Hi,

Quoted 25 lines · Gleb Natapov
Quoted 24 lines · André Weidemann
Quoted 23 lines · André Weidemann

Hi,
I am running Windows7 x64 in a VM which crashes after starting a certain game. Actually there are two games both from the same company, that make the VM crash after starting them.
Windows crashes right after starting the game. With the 1st game the screen goes black as usual and the cursor keeps spinning for 3-5 seconds until Windows crashes. With the second game I get to 3D the login screen. The game then crashes after logging in.
Windows displays this error message on the first crash:
http://pastebin.com/kMzk9Jif
Windows then finishes writing the crash dump and restarts.
I can reproduce Windows crashing every time I start the game while the VM keeps running without any problems.
When Windows reboots after the first crash and the game is started again, the message on the following blue screen changes slightly and stays the same(except for the addresses) for every following crash:
http://pastebin.com/jVtBc4ZH

I first thought that this might be related to a certain feature in 3D acceleration being used, but Futuremark 3DMark Vantage or 3DMark 11 run without any problems. They run a bit choppy on some occasions, but do that without crashing Windows7 or the VM.

Quoted 5 lines
Quoted 4 lines
Quoted 1 line

How can I proceed to investigate what is going wrong?

I did some testing and found out that Windows7 does not crash anymore when changing "-cpu host" to "-cpu Nehalem". After doing so,

What is your host cpu (cat /proc/cpuinfo)?

The server is currently running on 2 out of 8 cores with kernel boot parameter "maxcpus=2".

Quoted 6 lines

flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr
pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx rdtscp lm constant_tsc arch_perfmon pebs bts rep_good xtopology nonstop_tsc aperfmperf pni dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm sse4_1 sse4_2 popcnt lahf_lm ida tpr_shadow vnmi flexpriority ept vpid

Flags that are present on -cpu host but not -cpu Nehalem (excluding vmx related flags):

vme dts acpi ss ht tm pbe rdtscp constant_tsc arch_perfmon pebs bts rep_good xtopology nonstop_tsc aperfmperf dtes64 monitor ds_cpl est tm2 xtpr pdcm ida

Some of them may be synthetic and some of them may be filtered by KVM.

Can you try to run "-cpu host,-vme,-dts..." (specifying all of those flags with -). Drop those that qemu does not recognize. See if result will be the same as with -cpu Nehalem. If yes, then try to find out with flag make the difference.

--
Gleb.

#6 lore raw
Quoted 50 lines · Gleb Natapov
Quoted 37 lines · André Weidemann

Hi,

Quoted 25 lines · Gleb Natapov
Quoted 24 lines · André Weidemann
Quoted 23 lines · André Weidemann

Hi,
I am running Windows7 x64 in a VM which crashes after starting a certain game. Actually there are two games both from the same company, that make the VM crash after starting them.
Windows crashes right after starting the game. With the 1st game the screen goes black as usual and the cursor keeps spinning for 3-5 seconds until Windows crashes. With the second game I get to 3D the login screen. The game then crashes after logging in.
Windows displays this error message on the first crash:
http://pastebin.com/kMzk9Jif
Windows then finishes writing the crash dump and restarts.
I can reproduce Windows crashing every time I start the game while the VM keeps running without any problems.
When Windows reboots after the first crash and the game is started again, the message on the following blue screen changes slightly and stays the same(except for the addresses) for every following crash:
http://pastebin.com/jVtBc4ZH

I first thought that this might be related to a certain feature in 3D acceleration being used, but Futuremark 3DMark Vantage or 3DMark 11 run without any problems. They run a bit choppy on some occasions, but do that without crashing Windows7 or the VM.

Quoted 5 lines
Quoted 4 lines
Quoted 1 line

How can I proceed to investigate what is going wrong?

I did some testing and found out that Windows7 does not crash anymore when changing "-cpu host" to "-cpu Nehalem". After doing so,

What is your host cpu (cat /proc/cpuinfo)?

The server is currently running on 2 out of 8 cores with kernel boot parameter "maxcpus=2".

Quoted 6 lines

flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr
pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx rdtscp lm constant_tsc arch_perfmon pebs bts rep_good xtopology nonstop_tsc aperfmperf pni dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm sse4_1 sse4_2 popcnt lahf_lm ida tpr_shadow vnmi flexpriority ept vpid

Flags that are present on -cpu host but not -cpu Nehalem (excluding vmx related flags):

vme dts acpi ss ht tm pbe rdtscp constant_tsc arch_perfmon pebs bts rep_good xtopology nonstop_tsc aperfmperf dtes64 monitor ds_cpl est tm2 xtpr pdcm ida

Quoted 6 lines

Some of them may be synthetic and some of them may be filtered by KVM.

Can you try to run "-cpu host,-vme,-dts..." (specifying all of those flags with -). Drop those that qemu does not recognize. See if result will be the same as with -cpu Nehalem. If yes, then try to find out with flag make the difference.

I started the VM with all flags that differ between the two CPUs. After removing the ones qemu-kvm did not recognize, I started the VM again with the following line:
-cpu host,-vme,-acpi,-ss,-ht,-tm,-pbe,-rdtscp,-dtes64,-monitor,-ds_cpl,-est,-tm2,-xtpr,-pdcm \

Running the program under Windows7 inside the VM, caused Windows to crash again with a BSoD. The disassembly of the address fffff8000288320c shows the following:
http://pastebin.com/7yzTYJSG

André

#7 lore raw
Quoted 64 lines · André Weidemann
Quoted 50 lines · Gleb Natapov
Quoted 37 lines · André Weidemann

Hi,

Quoted 25 lines · Gleb Natapov
Quoted 24 lines · André Weidemann
Quoted 23 lines · André Weidemann

Hi,
I am running Windows7 x64 in a VM which crashes after starting a certain game. Actually there are two games both from the same company, that make the VM crash after starting them.
Windows crashes right after starting the game. With the 1st game the screen goes black as usual and the cursor keeps spinning for 3-5 seconds until Windows crashes. With the second game I get to 3D the login screen. The game then crashes after logging in.
Windows displays this error message on the first crash:
http://pastebin.com/kMzk9Jif
Windows then finishes writing the crash dump and restarts.
I can reproduce Windows crashing every time I start the game while the VM keeps running without any problems.
When Windows reboots after the first crash and the game is started again, the message on the following blue screen changes slightly and stays the same(except for the addresses) for every following crash:
http://pastebin.com/jVtBc4ZH

I first thought that this might be related to a certain feature in 3D acceleration being used, but Futuremark 3DMark Vantage or 3DMark 11 run without any problems. They run a bit choppy on some occasions, but do that without crashing Windows7 or the VM.

Quoted 5 lines
Quoted 4 lines
Quoted 1 line

How can I proceed to investigate what is going wrong?

I did some testing and found out that Windows7 does not crash anymore when changing "-cpu host" to "-cpu Nehalem". After doing so,

What is your host cpu (cat /proc/cpuinfo)?

The server is currently running on 2 out of 8 cores with kernel boot parameter "maxcpus=2".

Quoted 6 lines

flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr
pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx rdtscp lm constant_tsc arch_perfmon pebs bts rep_good xtopology nonstop_tsc aperfmperf pni dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm sse4_1 sse4_2 popcnt lahf_lm ida tpr_shadow vnmi flexpriority ept vpid

Flags that are present on -cpu host but not -cpu Nehalem (excluding vmx related flags):

vme dts acpi ss ht tm pbe rdtscp constant_tsc arch_perfmon pebs bts rep_good xtopology nonstop_tsc aperfmperf dtes64 monitor ds_cpl est tm2 xtpr pdcm ida

Quoted 6 lines

Some of them may be synthetic and some of them may be filtered by KVM.

Can you try to run "-cpu host,-vme,-dts..." (specifying all of those flags with -). Drop those that qemu does not recognize. See if result will be the same as with -cpu Nehalem. If yes, then try to find out with flag make the difference.

I started the VM with all flags that differ between the two CPUs.
After removing the ones qemu-kvm did not recognize, I started the VM
again with the following line:
-cpu host,-vme,-acpi,-ss,-ht,-tm,-pbe,-rdtscp,-dtes64,-monitor,-ds_cpl,-est,-tm2,-xtpr,-pdcm \

Quoted 5 lines

Running the program under Windows7 inside the VM, caused Windows to crash again with a BSoD.
The disassembly of the address fffff8000288320c shows the following:
http://pastebin.com/7yzTYJSG

Looks like it tries to read MSR_LASTBRANCH_TOS MSR which kvm does not support. Do you see something interesting in dmesg? I wonder how availability of the MSR should be checked.

--
Gleb.

#8 lore raw
Quoted 65 lines · Gleb Natapov
Quoted 64 lines · André Weidemann
Quoted 50 lines · Gleb Natapov
Quoted 37 lines · André Weidemann

Hi,

Quoted 25 lines · Gleb Natapov
Quoted 24 lines · André Weidemann
Quoted 23 lines · André Weidemann

Hi,
I am running Windows7 x64 in a VM which crashes after starting a certain game. Actually there are two games both from the same company, that make the VM crash after starting them.
Windows crashes right after starting the game. With the 1st game the screen goes black as usual and the cursor keeps spinning for 3-5 seconds until Windows crashes. With the second game I get to 3D the login screen. The game then crashes after logging in.
Windows displays this error message on the first crash:
http://pastebin.com/kMzk9Jif
Windows then finishes writing the crash dump and restarts.
I can reproduce Windows crashing every time I start the game while the VM keeps running without any problems.
When Windows reboots after the first crash and the game is started again, the message on the following blue screen changes slightly and stays the same(except for the addresses) for every following crash:
http://pastebin.com/jVtBc4ZH

I first thought that this might be related to a certain feature in 3D acceleration being used, but Futuremark 3DMark Vantage or 3DMark 11 run without any problems. They run a bit choppy on some occasions, but do that without crashing Windows7 or the VM.

Quoted 5 lines
Quoted 4 lines
Quoted 1 line

How can I proceed to investigate what is going wrong?

I did some testing and found out that Windows7 does not crash anymore when changing "-cpu host" to "-cpu Nehalem". After doing so,

What is your host cpu (cat /proc/cpuinfo)?

The server is currently running on 2 out of 8 cores with kernel boot parameter "maxcpus=2".

Quoted 6 lines

flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr
pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx rdtscp lm constant_tsc arch_perfmon pebs bts rep_good xtopology nonstop_tsc aperfmperf pni dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm sse4_1 sse4_2 popcnt lahf_lm ida tpr_shadow vnmi flexpriority ept vpid

Flags that are present on -cpu host but not -cpu Nehalem (excluding vmx related flags):

vme dts acpi ss ht tm pbe rdtscp constant_tsc arch_perfmon pebs bts rep_good xtopology nonstop_tsc aperfmperf dtes64 monitor ds_cpl est tm2 xtpr pdcm ida

Quoted 6 lines

Some of them may be synthetic and some of them may be filtered by KVM.

Can you try to run "-cpu host,-vme,-dts..." (specifying all of those flags with -). Drop those that qemu does not recognize. See if result will be the same as with -cpu Nehalem. If yes, then try to find out with flag make the difference.

I started the VM with all flags that differ between the two CPUs.
After removing the ones qemu-kvm did not recognize, I started the VM
again with the following line:
-cpu host,-vme,-acpi,-ss,-ht,-tm,-pbe,-rdtscp,-dtes64,-monitor,-ds_cpl,-est,-tm2,-xtpr,-pdcm \

Quoted 8 lines
Quoted 5 lines

Running the program under Windows7 inside the VM, caused Windows to crash again with a BSoD.
The disassembly of the address fffff8000288320c shows the following:
http://pastebin.com/7yzTYJSG

Looks like it tries to read MSR_LASTBRANCH_TOS MSR which kvm does not support. Do you see something interesting in dmesg? I wonder how availability of the MSR should be checked.

You are right about the MSR. The log file from the time of occurrence shows the following:

Jul  4 18:55:12 server kernel: [ 1528.618647] kvm: 3123: cpu1 kvm_set_msr_common: MSR_IA32_DEBUGCTLMSR 0x1, nop
Jul  4 18:55:12 server kernel: [ 1528.619444] kvm: 3123: cpu1 unhandled rdmsr: 0x1c9

André

#9 lore raw
Quoted 10 lines · André Weidemann
Quoted 3 lines

Looks like it tries to read MSR_LASTBRANCH_TOS MSR which kvm does not support. Do you see something interesting in dmesg? I wonder how availability of the MSR should be checked.

You are right about the MSR. The log file from the time of occurrence shows the following:

Jul  4 18:55:12 server kernel: [ 1528.618647] kvm: 3123: cpu1 kvm_set_msr_common: MSR_IA32_DEBUGCTLMSR 0x1, nop
Jul  4 18:55:12 server kernel: [ 1528.619444] kvm: 3123: cpu1 unhandled rdmsr: 0x1c9

You can try

$ rmmod kvm-intel kvm
$ modprobe kvm ignore_msrs=1
$ modprobe kvm-intel

(or kvm-amd, as the case may be)

This will work around the issue, but the application may not function correctly.

Signature · 1 line
error compiling committee.c: too many arguments to function
#10 lore raw
Quoted 17 lines · Avi Kivity
Quoted 5 lines · André Weidemann
Quoted 3 lines

Looks like it tries to read MSR_LASTBRANCH_TOS MSR which kvm does not support. Do you see something interesting in dmesg? I wonder how availability of the MSR should be checked.

Quoted 8 lines

You are right about the MSR. The log file from the time of occurrence shows the following:

Jul  4 18:55:12 server kernel: [ 1528.618647] kvm: 3123: cpu1
kvm_set_msr_common: MSR_IA32_DEBUGCTLMSR 0x1, nop
Jul  4 18:55:12 server kernel: [ 1528.619444] kvm: 3123: cpu1

unhandled rdmsr: 0x1c9

You can try

Quoted 9 lines
$ rmmod kvm-intel kvm
$ modprobe kvm ignore_msrs=1
$ modprobe kvm-intel

(or kvm-amd, as the case may be)

This will work around the issue, but the application may not function correctly.

I wonder why Windows tries to use this MSR with -cpu host, but not with -cpu Nehalem. Both cpus have this MSR (it is supported back to P4 it seams).

--
Gleb.

maintainer
#11 lore raw
In reply to André Weidemann
Quoted 9 lines · André Weidemann

Hi,
I am running Windows7 x64 in a VM which crashes after starting a certain game. Actually there are two games both from the same company, that make the VM crash after starting them.
Windows crashes right after starting the game. With the 1st game the screen goes black as usual and the cursor keeps spinning for 3-5 seconds until Windows crashes. With the second game I get to 3D the login screen. The game then crashes after logging in.
Windows displays this error message on the first crash:

Quoted 8 lines

http://pastebin.com/kMzk9Jif
Windows then finishes writing the crash dump and restarts. I can reproduce Windows crashing every time I start the game while the VM keeps running without any problems.
When Windows reboots after the first crash and the game is started again, the message on the following blue screen changes slightly and stays the same(except for the addresses) for every following crash:
http://pastebin.com/jVtBc4ZH

The blue screens seem to be for the same exception, 0xC0000096--privileged instruction, only sometimes in user mode (but in a system service, which also causes a blue screen) sometimes in kernel mode.

Can you open the produced dump in WinDbg and post a disassemble around the failing instruction?

Thanks,

Paolo

#12 lore raw
Quoted 19 lines · Paolo Bonzini
Quoted 9 lines · André Weidemann

Hi,
I am running Windows7 x64 in a VM which crashes after starting a certain game. Actually there are two games both from the same company, that make the VM crash after starting them.
Windows crashes right after starting the game. With the 1st game the screen goes black as usual and the cursor keeps spinning for 3-5 seconds until Windows crashes. With the second game I get to 3D the login screen. The game then crashes after logging in.
Windows displays this error message on the first crash:

Quoted 8 lines

http://pastebin.com/kMzk9Jif
Windows then finishes writing the crash dump and restarts. I can reproduce Windows crashing every time I start the game while the VM keeps running without any problems.
When Windows reboots after the first crash and the game is started again, the message on the following blue screen changes slightly and stays the same(except for the addresses) for every following crash:
http://pastebin.com/jVtBc4ZH

Quoted 5 lines

The blue screens seem to be for the same exception, 0xC0000096--privileged instruction, only sometimes in user mode (but in a system service, which also causes a blue screen) sometimes in kernel mode.

And I assume 0xFFFFF800028D8C0C is the instruction address? If yes then can you do "x/i 0xFFFFF800028D8C0C" in qemu monitor then (or whatever new address it will show you).

Quoted 10 lines

Can you open the produced dump in WinDbg and post a disassemble around the failing instruction?

Thanks,

Paolo
--
To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

--
Gleb.

#13 lore raw
In reply to Paolo Bonzini

Hi Paolo,

Quoted 19 lines · Paolo Bonzini
Quoted 9 lines · André Weidemann

Hi,
I am running Windows7 x64 in a VM which crashes after starting a certain game. Actually there are two games both from the same company, that make the VM crash after starting them.
Windows crashes right after starting the game. With the 1st game the screen goes black as usual and the cursor keeps spinning for 3-5 seconds until Windows crashes. With the second game I get to 3D the login screen. The game then crashes after logging in.
Windows displays this error message on the first crash:

Quoted 8 lines

http://pastebin.com/kMzk9Jif
Windows then finishes writing the crash dump and restarts. I can reproduce Windows crashing every time I start the game while the VM keeps running without any problems.
When Windows reboots after the first crash and the game is started again, the message on the following blue screen changes slightly and stays the same(except for the addresses) for every following crash:
http://pastebin.com/jVtBc4ZH

Quoted 7 lines

The blue screens seem to be for the same exception, 0xC0000096--privileged instruction, only sometimes in user mode (but in a system service, which also causes a blue screen) sometimes in kernel mode.

Can you open the produced dump in WinDbg and post a disassemble around the failing instruction?

I haven't used debuggers very much, so I hope I grabbed the correct lines from the disassembly:
http://pastebin.com/t3sfvmTg

André

#14 lore raw
Quoted 7 lines · André Weidemann
Quoted 2 lines

Can you open the produced dump in WinDbg and post a disassemble around the failing instruction?

I haven't used debuggers very much, so I hope I grabbed the correct lines from the disassembly:
http://pastebin.com/t3sfvmTg

That's the bug check routine. Can you go up a frame?

(I'd say how, but I forget).

Signature · 1 line
error compiling committee.c: too many arguments to function
maintainer
#15 lore raw
Quoted 5 lines · Avi Kivity
Quoted 3 lines

I haven't used debuggers very much, so I hope I grabbed the correct lines from the disassembly:
http://pastebin.com/t3sfvmTg

That's the bug check routine. Can you go up a frame?

Or just do what Gleb suggested. Open the dump, type "!analyze -v" and cut-paste the address from WinDbg's output into the Disassemble window.

Paolo

#16 lore raw

Hi,

Quoted 9 lines · Paolo Bonzini
Quoted 5 lines · Avi Kivity
Quoted 3 lines

I haven't used debuggers very much, so I hope I grabbed the correct lines from the disassembly:
http://pastebin.com/t3sfvmTg

That's the bug check routine. Can you go up a frame?

Or just do what Gleb suggested. Open the dump, type "!analyze -v" and cut-paste the address from WinDbg's output into the Disassemble window.

This is the output of "!analyze -v":
http://pastebin.com/sCZSjr8m

...and this is the output from the disassembly window:
http://pastebin.com/AVZuswkT

André

maintainer
#17 lore raw
Quoted 10 lines · André Weidemann

Hi,

Quoted 7 lines · Paolo Bonzini
Quoted 5 lines · Avi Kivity
Quoted 3 lines

I haven't used debuggers very much, so I hope I grabbed the correct lines from the disassembly:
http://pastebin.com/t3sfvmTg

That's the bug check routine. Can you go up a frame?

Quoted 8 lines
Quoted 2 lines

Or just do what Gleb suggested. Open the dump, type "!analyze -v" and cut-paste the address from WinDbg's output into the Disassemble window.

This is the output of "!analyze -v":
http://pastebin.com/sCZSjr8m

...and this is the output from the disassembly window:
http://pastebin.com/AVZuswkT

Very useful, thanks!

Paolo