提交 1a6f4d7f 编写于 作者: A Avi Kivity

KVM: Simplify CPU_TASKS_FROZEN cpu notifier handling

Signed-off-by: NAvi Kivity <avi@qumranet.com>
上级 906e608b
...@@ -1335,21 +1335,19 @@ static int kvm_cpu_hotplug(struct notifier_block *notifier, unsigned long val, ...@@ -1335,21 +1335,19 @@ static int kvm_cpu_hotplug(struct notifier_block *notifier, unsigned long val,
{ {
int cpu = (long)v; int cpu = (long)v;
val &= ~CPU_TASKS_FROZEN;
switch (val) { switch (val) {
case CPU_DYING: case CPU_DYING:
case CPU_DYING_FROZEN:
printk(KERN_INFO "kvm: disabling virtualization on CPU%d\n", printk(KERN_INFO "kvm: disabling virtualization on CPU%d\n",
cpu); cpu);
hardware_disable(NULL); hardware_disable(NULL);
break; break;
case CPU_UP_CANCELED: case CPU_UP_CANCELED:
case CPU_UP_CANCELED_FROZEN:
printk(KERN_INFO "kvm: disabling virtualization on CPU%d\n", printk(KERN_INFO "kvm: disabling virtualization on CPU%d\n",
cpu); cpu);
smp_call_function_single(cpu, hardware_disable, NULL, 0, 1); smp_call_function_single(cpu, hardware_disable, NULL, 0, 1);
break; break;
case CPU_ONLINE: case CPU_ONLINE:
case CPU_ONLINE_FROZEN:
printk(KERN_INFO "kvm: enabling virtualization on CPU%d\n", printk(KERN_INFO "kvm: enabling virtualization on CPU%d\n",
cpu); cpu);
smp_call_function_single(cpu, hardware_enable, NULL, 0, 1); smp_call_function_single(cpu, hardware_enable, NULL, 0, 1);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册