summaryrefslogtreecommitdiffstats
path: root/arch/ia64/kvm/kvm_lib.c
diff options
context:
space:
mode:
authorEduardo Habkost <ehabkost@redhat.com>2008-11-17 19:03:24 -0200
committerAvi Kivity <avi@redhat.com>2008-12-31 16:54:58 +0200
commitd176720d34c72f7a8474a12204add93e54fe3ef1 (patch)
treea611babe5215539fae73def1f707eef8be05dc92 /arch/ia64/kvm/kvm_lib.c
parent2340b62f77c782c305e6ae7748675a638436d1ef (diff)
x86: disable VMX on all CPUs on reboot
On emergency_restart, we may need to use an NMI to disable virtualization on all CPUs. We do that using nmi_shootdown_cpus() if VMX is enabled. Note: With this patch, we will run the NMI stuff only when the CPU where emergency_restart() was called has VMX enabled. This should work on most cases because KVM enables VMX on all CPUs, but we may miss the small window where KVM is doing that. Also, I don't know if all code using VMX out there always enable VMX on all CPUs like KVM does. We have two other alternatives for that: a) Have an API that all code that enables VMX on any CPU should use to tell the kernel core that it is going to enable VMX on the CPUs. b) Always call nmi_shootdown_cpus() if the CPU supports VMX. This is a bit intrusive and more risky, as it would run nmi_shootdown_cpus() on emergency_reboot() even on systems where virtualization is never enabled. Finding a proper point to hook the nmi_shootdown_cpus() call isn't trivial, as the non-emergency machine_restart() (that doesn't need the NMI tricks) uses machine_emergency_restart() directly. The solution to make this work without adding a new function or argument to machine_ops was setting a 'reboot_emergency' flag that tells if native_machine_emergency_restart() needs to do the virt cleanup or not. Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'arch/ia64/kvm/kvm_lib.c')
0 files changed, 0 insertions, 0 deletions