diff options
author | Avi Kivity <avi@redhat.com> | 2010-09-21 19:59:43 +0200 |
---|---|---|
committer | Marcelo Tosatti <mtosatti@redhat.com> | 2010-09-23 11:31:56 -0300 |
commit | ca242ac9960dc61530e25a2c190e4e13fd5f1ecb (patch) | |
tree | 96ecac4191e1e1146002df587d0076e6e61e63d0 | |
parent | 6bbfb2653177a00f70e57e53625502d43804fed0 (diff) | |
download | linux-ca242ac9960dc61530e25a2c190e4e13fd5f1ecb.tar.gz linux-ca242ac9960dc61530e25a2c190e4e13fd5f1ecb.tar.bz2 linux-ca242ac9960dc61530e25a2c190e4e13fd5f1ecb.zip |
KVM: Fix reboot on Intel hosts
When we reboot, we disable vmx extensions or otherwise INIT gets blocked.
If a task on another cpu hits a vmx instruction, it will fault if vmx is
disabled. We trap that to avoid a nasty oops and spin until the reboot
completes.
Problem is, we sleep with interrupts disabled. This blocks smp_send_stop()
from running, and the reboot process halts.
Fix by enabling interrupts before spinning.
KVM-Stable-Tag.
Signed-off-by: Avi Kivity <avi@redhat.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
-rw-r--r-- | virt/kvm/kvm_main.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c index d4853a54771a..5186e728c53e 100644 --- a/virt/kvm/kvm_main.c +++ b/virt/kvm/kvm_main.c @@ -1970,10 +1970,12 @@ static int kvm_cpu_hotplug(struct notifier_block *notifier, unsigned long val, asmlinkage void kvm_handle_fault_on_reboot(void) { - if (kvm_rebooting) + if (kvm_rebooting) { /* spin while reset goes on */ + local_irq_enable(); while (true) ; + } /* Fault while not rebooting. We want the trace. */ BUG(); } |