]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: Handle virtualization instruction #UD faults during reboot
authorAvi Kivity <avi@qumranet.com>
Tue, 13 May 2008 10:23:38 +0000 (13:23 +0300)
committerAvi Kivity <avi@qumranet.com>
Sun, 20 Jul 2008 09:41:43 +0000 (12:41 +0300)
commit55818be1cd25e8aeb3bb34a43b6e5fcd8f360fe5
treea078acb4c626432ac8cf887b911d912f4a316d06
parent431824aa09c085ab7c976192f8cf0ab480918193
KVM: Handle virtualization instruction #UD faults during reboot

KVM turns off hardware virtualization extensions during reboot, in order
to disassociate the memory used by the virtualization extensions from the
processor, and in order to have the system in a consistent state.
Unfortunately virtual machines may still be running while this goes on,
and once virtualization extensions are turned off, any virtulization
instruction will #UD on execution.

Fix by adding an exception handler to virtualization instructions; if we get
an exception during reboot, we simply spin waiting for the reset to complete.
If it's a true exception, BUG() so we can have our stack trace.

Signed-off-by: Avi Kivity <avi@qumranet.com>
arch/x86/kvm/svm.c
arch/x86/kvm/vmx.c
include/asm-x86/kvm_host.h
virt/kvm/kvm_main.c