]> git.baikalelectronics.ru Git - kernel.git/commitdiff
KVM: Unregister cpufreq notifier on unload
authorJan Kiszka <jan.kiszka@siemens.com>
Fri, 17 Apr 2009 17:24:58 +0000 (19:24 +0200)
committerAvi Kivity <avi@redhat.com>
Wed, 22 Apr 2009 10:54:33 +0000 (13:54 +0300)
Properly unregister cpufreq notifier on onload if it was registered
during init.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
arch/x86/kvm/x86.c

index a1ecec5c03e9a1ea08b6631fb79ecc1082bb9072..7c1ce5ac61311d49b8af706d744f49d4a480999d 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();
 }