KVM: Unregister cpufreq notifier on unload
[safe/jmp/linux-2.6] / arch / x86 / kvm / x86.c
index a1ecec5..7c1ce5a 100644 (file)
@@ -2775,6 +2775,9 @@ out:
 
 void kvm_arch_exit(void)
 {
+       if (!boot_cpu_has(X86_FEATURE_CONSTANT_TSC))
+               cpufreq_unregister_notifier(&kvmclock_cpufreq_notifier_block,
+                                           CPUFREQ_TRANSITION_NOTIFIER);
        kvm_x86_ops = NULL;
        kvm_mmu_module_exit();
 }