alistair23-linux/arch
Eduardo Habkost d176720d34 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>
2008-12-31 16:54:58 +02:00
..
alpha alpha: remove dead BIO_VMERGE_BOUNDARY 2008-12-29 08:29:51 +01:00
arm Merge branch 'devel' of master.kernel.org:/home/rmk/linux-2.6-arm 2008-12-30 17:36:49 -08:00
avr32 avr32: favr-32 build fix 2008-12-18 16:22:13 +01:00
blackfin kbuild: use KECHO convenience echo 2008-12-03 21:32:01 +01:00
cris [CRIS] Remove links from CRIS build 2008-10-31 23:37:57 +01:00
frv frv: fix mmap2 error handling 2008-12-01 19:55:24 -08:00
h8300 Merge branch 'for-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/dvrabel/uwb 2008-10-23 08:20:34 -07:00
ia64 KVM: ia64: Remove some macro definitions in asm-offsets.c. 2008-12-31 16:52:25 +02:00
m32r Merge branch 'sched/urgent' into sched/core 2008-12-08 13:52:00 +01:00
m68k m68k: fix trigraph ignored warning in setox.S 2008-12-28 20:00:05 +01:00
m68knommu container freezer: implement freezer cgroup subsystem 2008-10-20 08:52:34 -07:00
mips Merge branch 'sched-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip 2008-12-28 12:27:58 -08:00
mn10300 MN10300: Give correct size when reserving interrupt vector table 2008-12-10 13:34:33 -08:00
parisc Merge branch 'next' into for-linus 2008-12-25 11:40:09 +11:00
powerpc KVM: ppc: fix userspace mapping invalidation on context switch 2008-12-31 16:52:26 +02:00
s390 Merge git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-for-linus 2008-12-30 17:37:25 -08:00
sh Merge branch 'for-linus' of git://git390.osdl.marist.edu/pub/scm/linux-2.6 2008-12-28 12:33:21 -08:00
sparc Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/torvalds/linux-2.6 2008-12-28 20:19:47 -08:00
um Merge branch 'core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip 2008-12-30 16:10:19 -08:00
x86 x86: disable VMX on all CPUs on reboot 2008-12-31 16:54:58 +02:00
xtensa xtensa: Kill directly reference of netdev->priv 2008-12-04 15:06:56 -08:00
.gitignore
Kconfig oprofile: select RING_BUFFER 2008-12-12 09:46:31 +01:00