Commit:     6ec8a856e4097d42ece9b0b9459bbca1586f13d7
Parent:     e598fbaabdb6608915cbc5e80409d70f4f857e5c
Author:     Avi Kivity <[EMAIL PROTECTED]>
AuthorDate: Sun Aug 19 15:57:26 2007 +0300
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Sun Aug 19 10:13:49 2007 -0700

    KVM: Avoid calling smp_call_function_single() with interrupts disabled
    When taking a cpu down, we need to hardware_disable() it.
    Unfortunately, the CPU_DYING notifier is called with interrupts
    disabled, which means we can't use smp_call_function_single().
    Fortunately, the CPU_DYING notifier is always called on the dying cpu,
    so we don't need to use the function at all and can simply call
    hardware_disable() directly.
    Tested-by: Paolo Ornati <[EMAIL PROTECTED]>
    Signed-off-by: Avi Kivity <[EMAIL PROTECTED]>
    Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
 drivers/kvm/kvm_main.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/drivers/kvm/kvm_main.c b/drivers/kvm/kvm_main.c
index 9685609..cd05579 100644
--- a/drivers/kvm/kvm_main.c
+++ b/drivers/kvm/kvm_main.c
@@ -2974,6 +2974,10 @@ static int kvm_cpu_hotplug(struct notifier_block 
*notifier, unsigned long val,
        switch (val) {
        case CPU_DYING:
        case CPU_DYING_FROZEN:
+               printk(KERN_INFO "kvm: disabling virtualization on CPU%d\n",
+                      cpu);
+               hardware_disable(NULL);
+               break;
        case CPU_UP_CANCELED:
                printk(KERN_INFO "kvm: disabling virtualization on CPU%d\n",
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

Reply via email to