Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=43934a38d7cb39ff33baedc7f2c40a2a891116fa
Commit:     43934a38d7cb39ff33baedc7f2c40a2a891116fa
Parent:     bf3f8e86c2e22b9bd1375be1bbbd67384dba4342
Author:     Jeremy Katz <[EMAIL PROTECTED]>
AuthorDate: Mon Feb 19 14:37:46 2007 +0200
Committer:  Avi Kivity <[EMAIL PROTECTED]>
CommitDate: Sun Mar 4 11:12:39 2007 +0200

    KVM: Move virtualization deactivation from CPU_DEAD state to 
CPU_DOWN_PREPARE
    
    This gives it more chances of surviving suspend.
    
    Signed-off-by: Jeremy Katz <[EMAIL PROTECTED]>
    Signed-off-by: Avi Kivity <[EMAIL PROTECTED]>
---
 drivers/kvm/kvm_main.c |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/drivers/kvm/kvm_main.c b/drivers/kvm/kvm_main.c
index af86614..0a96c2c 100644
--- a/drivers/kvm/kvm_main.c
+++ b/drivers/kvm/kvm_main.c
@@ -2080,13 +2080,17 @@ static int kvm_cpu_hotplug(struct notifier_block 
*notifier, unsigned long val,
        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 git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to