lkml.org 
[lkml]   [2007]   [Feb]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Subject[PATCH 2/13] KVM: Move virtualization deactivation from CPU_DEAD state to CPU_DOWN_PREPARE
    From
    Date
    From: Jeremy Katz <katzj@redhat.com>

    This gives it more chances of surviving suspend.

    Signed-off-by: Jeremy Katz <katzj@redhat.com>
    Signed-off-by: Avi Kivity <avi@qumranet.com>

    Index: linux-2.6/drivers/kvm/kvm_main.c
    ===================================================================
    --- linux-2.6.orig/drivers/kvm/kvm_main.c
    +++ linux-2.6/drivers/kvm/kvm_main.c
    @@ -2080,13 +2080,17 @@ static int kvm_cpu_hotplug(struct notifi
    int cpu = (long)v;

    switch (val) {
    - case CPU_DEAD:
    + case CPU_DOWN_PREPARE:
    case CPU_UP_CANCELED:
    + printk(KERN_INFO "kvm: disabling virtualization on CPU%d\n",
    + cpu);
    decache_vcpus_on_cpu(cpu);
    smp_call_function_single(cpu, kvm_arch_ops->hardware_disable,
    NULL, 0, 1);
    break;
    - case CPU_UP_PREPARE:
    + case CPU_ONLINE:
    + printk(KERN_INFO "kvm: enabling virtualization on CPU%d\n",
    + cpu);
    smp_call_function_single(cpu, kvm_arch_ops->hardware_enable,
    NULL, 0, 1);
    break;
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/
    \
     
     \ /
      Last update: 2007-02-19 11:25    [W:0.031 / U:60.828 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site