Skip to contentSkip to conversation

BSOD when using Hyper-V extensions with Win2k8R2 guests

Qemu-devel Michael Roth 4 participants 7 messages Mar 15, 2012

lore
Share & tools
lore
#0 lore raw

Hi Vadim,

I've been trying to use -cpu qemu64,hv_relaxed as a workaround for a CLOCK_WATCHDOG_TIMEOUT BSOD on Windows 2008 R2 guests when a vcpu's execution is delayed for an extended period. When I do this however I get the following the BSOD:

http://msdn.microsoft.com/en-us/library/windows/hardware/ff559206(v=vs.85).aspx

I've also tried -cpu qemu64,hv_spinlocks=4 and -cpu qemu64,hv_vapic as a sanity check and this results in the same error being thrown.

Host is RHEL6.1 using latest qemu.git, guests are win2k8 server r2 (same behavior for both SP0 and SP1). Here's the full command-line:

qemu-upstream -L ../qemu-build/pc-bios -cpu qemu64,hv_relaxed --enable-kvm \
    -M pc-1.1 -enable-kvm -m 4096 -smp 4,sockets=4,cores=1,threads=1 \
    -name ichigo-dom45 -nodefconfig -nodefaults -rtc base=utc,driftfix=slew \
    -drive file=/scratch/mdroth/win2k8r2sp1.raw,if=none,id=drive0,format=raw,cache=writethrough,snapshot=on \
    -device virtio-blk-pci,bus=pci.0,drive=drive0,id=disk0,bootindex=1 \
    -netdev tap,id=hostnet0,script=/etc/qemu-ifup \
    -device virtio-net-pci,netdev=hostnet0,id=net0,mac=00:FF:FE:00:00:2d,bus=pci.0 \
    -device virtio-balloon-pci,id=balloon0,bus=pci.0 \
    -usb -device usb-tablet,id=input0 -vnc 0.0.0.0:45 -vga cirrus

Unfortunately the BSOD is too early to get a kernel dump, but here are the error params in case that's useful:

0xFC0000096, 0xF800027F6200, 0x0, 0x0

Let me know if you need any other details.

Thanks!

#1 lore raw
Quoted 7 lines · Michael Roth

Hi Vadim,

I've been trying to use -cpu qemu64,hv_relaxed as a workaround for a CLOCK_WATCHDOG_TIMEOUT BSOD on Windows 2008 R2 guests when a vcpu's execution is delayed for an extended period. When I do this however I get the following the BSOD:

Quoted 7 lines

http://msdn.microsoft.com/en-us/library/windows/hardware/ff559206(v=vs.85).
aspx

I've also tried -cpu qemu64,hv_spinlocks=4 and -cpu qemu64,hv_vapic as a sanity check and this results in the same error being thrown.

Host is RHEL6.1 using latest qemu.git, guests are win2k8 server r2 (same

I'm pretty much sure that hyper-v support was not backported into RHEL 6.1 KVM.
Best regards,
Vadim.

Quoted 22 lines

behavior for both SP0 and SP1). Here's the full command-line:

qemu-upstream -L ../qemu-build/pc-bios -cpu qemu64,hv_relaxed --enable-kvm \ -M pc-1.1 -enable-kvm -m 4096 -smp 4,sockets=4,cores=1,threads=1 \ -name ichigo-dom45 -nodefconfig -nodefaults -rtc base=utc,driftfix=slew \ -drive file=/scratch/mdroth/win2k8r2sp1.raw,if=none,id=drive0,format=raw,cache=wr itethrough,snapshot=on \ -device virtio-blk-pci,bus=pci.0,drive=drive0,id=disk0,bootindex=1 \ -netdev tap,id=hostnet0,script=/etc/qemu-ifup \
-device
virtio-net-pci,netdev=hostnet0,id=net0,mac=00:FF:FE:00:00:2d,bus=pci.0 \

-device virtio-balloon-pci,id=balloon0,bus=pci.0 \
    -usb -device usb-tablet,id=input0 -vnc 0.0.0.0:45 -vga cirrus

Unfortunately the BSOD is too early to get a kernel dump, but here are the error params in case that's useful:

0xFC0000096, 0xF800027F6200, 0x0, 0x0

Let me know if you need any other details.

Thanks!

#2 lore raw
Quoted 11 lines · Vadim Rozenfeld
Quoted 10 lines · Michael Roth

Hi Vadim,

I've been trying to use -cpu qemu64,hv_relaxed as a workaround for a CLOCK_WATCHDOG_TIMEOUT BSOD on Windows 2008 R2 guests when a vcpu's execution is delayed for an extended period. When I do this however I get the following the BSOD:

http://msdn.microsoft.com/en-us/library/windows/hardware/ff559206(v=vs.85).
aspx

Quoted 7 lines
Quoted 4 lines

I've also tried -cpu qemu64,hv_spinlocks=4 and -cpu qemu64,hv_vapic as a sanity check and this results in the same error being thrown.

Host is RHEL6.1 using latest qemu.git, guests are win2k8 server r2 (same

I'm pretty much sure that hyper-v support was not backported into RHEL 6.1 KVM.

So is there a hyper-v capability for KVM then? Or a CPUID feature?

Should QEMU refuse to enable hv_relaxed if the capability isn't present?

Regards,

Anthony Liguori

Quoted 26 lines

Best regards,
Vadim.

Quoted 22 lines

behavior for both SP0 and SP1). Here's the full command-line:

qemu-upstream -L ../qemu-build/pc-bios -cpu qemu64,hv_relaxed --enable-kvm \ -M pc-1.1 -enable-kvm -m 4096 -smp 4,sockets=4,cores=1,threads=1 \ -name ichigo-dom45 -nodefconfig -nodefaults -rtc base=utc,driftfix=slew \ -drive file=/scratch/mdroth/win2k8r2sp1.raw,if=none,id=drive0,format=raw,cache=wr itethrough,snapshot=on \ -device virtio-blk-pci,bus=pci.0,drive=drive0,id=disk0,bootindex=1 \ -netdev tap,id=hostnet0,script=/etc/qemu-ifup \
-device
virtio-net-pci,netdev=hostnet0,id=net0,mac=00:FF:FE:00:00:2d,bus=pci.0 \

-device virtio-balloon-pci,id=balloon0,bus=pci.0 \
     -usb -device usb-tablet,id=input0 -vnc 0.0.0.0:45 -vga cirrus

Unfortunately the BSOD is too early to get a kernel dump, but here are the error params in case that's useful:

0xFC0000096, 0xF800027F6200, 0x0, 0x0

Let me know if you need any other details.

Thanks!

#3 lore raw
Quoted 15 lines · Anthony Liguori
Quoted 14 lines · Vadim Rozenfeld
Quoted 13 lines · Michael Roth

Hi Vadim,

I've been trying to use -cpu qemu64,hv_relaxed as a workaround for a CLOCK_WATCHDOG_TIMEOUT BSOD on Windows 2008 R2 guests when a vcpu's execution is delayed for an extended period. When I do this however I get the following the BSOD:

http://msdn.microsoft.com/en-us/library/windows/hardware/ff559206(v=vs.8
5). aspx

I've also tried -cpu qemu64,hv_spinlocks=4 and -cpu qemu64,hv_vapic as a sanity check and this results in the same error being thrown.

Quoted 6 lines
Quoted 4 lines
Quoted 1 line

Host is RHEL6.1 using latest qemu.git, guests are win2k8 server r2 (same

I'm pretty much sure that hyper-v support was not backported into RHEL 6.1 KVM.

So is there a hyper-v capability for KVM then? Or a CPUID feature?

KVM_CAP_HYPERV, but we don't use it at the moment.

Quoted 2 lines

Should QEMU refuse to enable hv_relaxed if the capability isn't present?

Yes. I will submit a patch.
Best regards,
Vadim.

Quoted 34 lines

Regards,

Anthony Liguori

Quoted 29 lines

Best regards,
Vadim.

Quoted 26 lines

behavior for both SP0 and SP1). Here's the full command-line:

qemu-upstream -L ../qemu-build/pc-bios -cpu qemu64,hv_relaxed --enable-kvm \ -M pc-1.1 -enable-kvm -m 4096 -smp 4,sockets=4,cores=1,threads=1 \ -name ichigo-dom45 -nodefconfig -nodefaults -rtc base=utc,driftfix=slew \ -drive file=/scratch/mdroth/win2k8r2sp1.raw,if=none,id=drive0,format=raw,cache =wr itethrough,snapshot=on \ -device virtio-blk-pci,bus=pci.0,drive=drive0,id=disk0,bootindex=1 \ -netdev tap,id=hostnet0,script=/etc/qemu-ifup \

-device

virtio-net-pci,netdev=hostnet0,id=net0,mac=00:FF:FE:00:00:2d,bus=pci.0 \
-device virtio-balloon-pci,id=balloon0,bus=pci.0 \

     -usb -device usb-tablet,id=input0 -vnc 0.0.0.0:45 -vga cirrus

Unfortunately the BSOD is too early to get a kernel dump, but here are the error params in case that's useful:

0xFC0000096, 0xF800027F6200, 0x0, 0x0

Let me know if you need any other details.

Thanks!

#4 lore raw
In reply to Michael Roth

Il 15/03/2012 20:14, Michael Roth ha scritto:

Quoted 7 lines

Unfortunately the BSOD is too early to get a kernel dump, but here are the error params in case that's useful:

0xFC0000096, 0xF800027F6200, 0x0, 0x0

Let me know if you need any other details.

You can use the Windows Boot Debugger. (Disclaimer: I only used it once). Enable it with "bcdedit /bootdebug {current} ON".

To use it, you need two Windows VMs (the one that fails and one with WinDbg installed). It is the same as doing normal kernel debugging except that the debuggee will hang waiting for a connection even before showing the boot loader prompt. You need to connect the serial consoles of the VMs; I usually use socat like

socat "PIPE:$tty1,unlink-close=0,noctty=1" \
      "PIPE:$tty2,unlink-close=0,noctty=1

with the tty names taken from libvirt's XML. It probably works with Unix sockets too but I never tried.

Quoted 1 line

From WinDbg you should be able to get a backtrace. If you never used

WinDbg, remember to set it up for downloading symbols:
http://support.microsoft.com/kb/311503

HTH,

Paolo

#5 lore raw
Quoted 18 lines · Paolo Bonzini

Il 15/03/2012 20:14, Michael Roth ha scritto:

Quoted 7 lines

Unfortunately the BSOD is too early to get a kernel dump, but here are the error params in case that's useful:

0xFC0000096, 0xF800027F6200, 0x0, 0x0

Let me know if you need any other details.

You can use the Windows Boot Debugger. (Disclaimer: I only used it once). Enable it with "bcdedit /bootdebug {current} ON".

To use it, you need two Windows VMs (the one that fails and one with WinDbg installed). It is the same as doing normal kernel debugging except that the debuggee will hang waiting for a connection even before showing the boot loader prompt. You need to connect the serial consoles of the VMs; I usually use socat like

Quoted 5 lines
socat "PIPE:$tty1,unlink-close=0,noctty=1" \
      "PIPE:$tty2,unlink-close=0,noctty=1

with the tty names taken from libvirt's XML. It probably works with Unix sockets too but I never tried.

Nice. I knew it was possible but never tried setting it up before. Really useful to know, thanks!

Quoted 9 lines

From WinDbg you should be able to get a backtrace. If you never used WinDbg, remember to set it up for downloading symbols:
http://support.microsoft.com/kb/311503

HTH,

Paolo

#6 lore raw
In reply to Paolo Bonzini
Quoted 11 lines · Paolo Bonzini

Il 15/03/2012 20:14, Michael Roth ha scritto:

Quoted 6 lines

Unfortunately the BSOD is too early to get a kernel dump, but here are the error params in case that's useful:

0xFC0000096, 0xF800027F6200, 0x0, 0x0

Let me know if you need any other details.

You can use the Windows Boot Debugger. (Disclaimer: I only used it once). Enable it with "bcdedit /bootdebug {current} ON".

It is not a loader problem. You even don't need to turn halbreakpoint option on.

Quoted 19 lines

To use it, you need two Windows VMs (the one that fails and one with WinDbg installed). It is the same as doing normal kernel debugging except that the debuggee will hang waiting for a connection even before showing the boot loader prompt. You need to connect the serial consoles of the VMs; I usually use socat like

socat "PIPE:$tty1,unlink-close=0,noctty=1" \
      "PIPE:$tty2,unlink-close=0,noctty=1

with the tty names taken from libvirt's XML. It probably works with Unix sockets too but I never tried.

From WinDbg you should be able to get a backtrace. If you never used WinDbg, remember to set it up for downloading symbols:
http://support.microsoft.com/kb/311503

HTH,

Paolo