From: Avi Kivity Date: Thu, 24 May 2007 10:11:41 +0000 (+0300) Subject: KVM: Use CPU_DYING for disabling virtualization X-Git-Tag: v2.6.23-rc1~520^2 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=cec9ad279b66793bee0b5009b7ca311060061efd;p=linux-2.6-omap-h63xx.git 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 --- diff --git a/drivers/kvm/kvm_main.c b/drivers/kvm/kvm_main.c index 603e8ce3d65..1b206f197c6 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, int cpu = (long)v; switch (val) { - case CPU_DOWN_PREPARE: - case CPU_DOWN_PREPARE_FROZEN: + case CPU_DYING: + case CPU_DYING_FROZEN: case CPU_UP_CANCELED: case CPU_UP_CANCELED_FROZEN: printk(KERN_INFO "kvm: disabling virtualization on CPU%d\n",