Skip to content

HyperV equivalent of pvpanic driver

Denis V. Lunev kvm qemu-devel 6 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v6 Latest12 patches 9 repliesIn review
  2. v512 patches 4 repliesSuperseded
  3. v48 of 12 patches 0 repliesSuperseded
Earlier versions · 3
VersionPostedPatchesRepliesStatus
v39 patches21 repliesSuperseded
v211 patches19 repliesSuperseded
v12 patches7 repliesSuperseded

Changes in v6 from the cover letter

* added hyperv crash msrs into supported/emulated list
* qemu: reset CPUState::crash_occurred at cpu reset
* qemu: userspace checks kernel support of hyperv crash msrs by kvm_get_supported_msrs

Patches in v6 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/12kvm/x86: move Hyper-V MSR's/hypercall code into hyperv.c filearch/x86/include/asm/kvm_host.h arch/x86/kvm/Makefile arch/x86/kvm/hyperv.c +4 more+366 -2690 replies
2/12kvm: introduce vcpu_debug = kvm_debug + vcpu contextinclude/linux/kvm_host.h+3 -00 replies
3/12kvm: add hyper-v crash msrs valuesarch/x86/include/uapi/asm/hyperv.h+11 -00 replies
4/12kvm/x86: added hyper-v crash msrs into kvm hyperv contextarch/x86/include/asm/kvm_host.h+4 -00 replies
5/12kvm: added KVM_REQ_HV_CRASH value to notify qemu about hyper-v crashinclude/linux/kvm_host.h+1 -00 replies
6/12kvm/x86: mark hyper-v crash msrs as partition widearch/x86/kvm/hyperv.c+2 -00 replies
7/12kvm/x86: added hyper-v crash data and ctl msr's get/set'ersarch/x86/kvm/hyperv.c arch/x86/kvm/hyperv.h arch/x86/kvm/x86.c+80 -52 replies
8/12kvm/x86: add sending hyper-v crash notification to user spaceDocumentation/virtual/kvm/api.txt arch/x86/kvm/x86.c include/uapi/linux/kvm.h+12 -00 replies
9/12Added generic panic handler qemu_system_guest_panicked()hw/misc/pvpanic.c include/sysemu/sysemu.h target-s390x/kvm.c +1 more+10 -110 replies
10/12kvm: Add kvm system event crash handlerkvm-all.c linux-headers/linux/kvm.h+5 -00 replies
11/12cpu: Add crash_occurred flag into CPUStateexec.c include/qom/cpu.h qom/cpu.c +1 more+24 -01 reply
12/12i386/kvm: Hyper-v crash msrs set/get'ers and migrationlinux-headers/asm-x86/hyperv.h target-i386/cpu-qom.h target-i386/cpu.c +3 more+75 -12 replies

Reviews trailers per patch

8 of 12 patches have a Reviewed-by or Acked-by.

PatchPeter Hornyack
1/12R-b
2/12R-b
3/12R-b
4/12R-b
5/12R-b
6/12R-b
7/12R-b
8/12R-b
9/12
10/12
11/12
12/12

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v6 thread

Cover letter [PATCH v6 0/12] HyperV equivalent of pvpanic driver

Windows 2012 guests can notify hypervisor about occurred guest crash (Windows bugcheck(BSOD)) by writing specific Hyper-V msrs. This patch does handling of this MSR's by KVM and sending notification to user space that allows to gather Windows guest crash dump by QEMU/LIBVIRT.

The idea is to provide functionality equal to pvpanic device without QEMU guest agent for Windows.

The idea is borrowed from Linux HyperV bus driver and validated against Windows 2k12.

Changes from v5:
* added hyperv crash msrs into supported/emulated list
* qemu: reset CPUState::crash_occurred at cpu reset
* qemu: userspace checks kernel support of hyperv crash msrs by kvm_get_supported_msrs

Changes from v4:
* fixed typo in email of Andreas Färber <[email protected]> my vim strangely behaves on lines with extended Deutch chars

Changes from v3:
* remove unused HV_X64_MSR_CRASH_CTL_NOTIFY
* added documentation section about KVM_SYSTEM_EVENT_CRASH
* allow only supported values inside crash ctl msr
* qemu: split patch into generic crash handling patches and hyperv specific
* qemu: skip migration of crash ctl msr value

Changes from v2:
* forbid modification crash ctl msr by guest
* qemu_system_guest_panicked usage in pvpanic and s390x
* hyper-v crash handler move from generic kvm to i386
* hyper-v crash handler: skip fetching crash msrs just mark crash occurred
* sync with linux-next 20150629
* patch 11 squashed to patch 10
* patch 9 squashed to patch 7

Changes from v1:
* hyperv code move to hyperv.c
* added read handlers of crash data msrs
* added per vm and per cpu hyperv context structures
* added saving crash msrs inside qemu cpu state
* added qemu fetch and update of crash msrs
* added qemu crash msrs store in cpu state and it's migration