diff options
author | Avi Kivity <avi@qumranet.com> | 2007-05-24 06:11:41 -0400 |
---|---|---|
committer | Avi Kivity <avi@qumranet.com> | 2007-07-16 05:05:51 -0400 |
commit | cec9ad279b66793bee0b5009b7ca311060061efd (patch) | |
tree | 13608d474b725e3c155f2c4387b524743f60d4b8 | |
parent | 4267c41a458cd7d287dc8031468fc385c2f5b2c3 (diff) |
KVM: Use CPU_DYING for disabling virtualization
Only at the CPU_DYING stage can we be sure that no user process will
be scheduled onto the cpu and oops when trying to use virtualization
extensions.
Signed-off-by: Avi Kivity <avi@qumranet.com>
-rw-r--r-- | drivers/kvm/kvm_main.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/kvm/kvm_main.c b/drivers/kvm/kvm_main.c index 603e8ce3d65e..1b206f197c6b 100644 --- a/drivers/kvm/kvm_main.c +++ b/drivers/kvm/kvm_main.c | |||
@@ -3004,8 +3004,8 @@ static int kvm_cpu_hotplug(struct notifier_block *notifier, unsigned long val, | |||
3004 | int cpu = (long)v; | 3004 | int cpu = (long)v; |
3005 | 3005 | ||
3006 | switch (val) { | 3006 | switch (val) { |
3007 | case CPU_DOWN_PREPARE: | 3007 | case CPU_DYING: |
3008 | case CPU_DOWN_PREPARE_FROZEN: | 3008 | case CPU_DYING_FROZEN: |
3009 | case CPU_UP_CANCELED: | 3009 | case CPU_UP_CANCELED: |
3010 | case CPU_UP_CANCELED_FROZEN: | 3010 | case CPU_UP_CANCELED_FROZEN: |
3011 | printk(KERN_INFO "kvm: disabling virtualization on CPU%d\n", | 3011 | printk(KERN_INFO "kvm: disabling virtualization on CPU%d\n", |