summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorJan Kiszka <jan.kiszka@siemens.com>2009-04-17 19:24:58 +0200
committerAvi Kivity <avi@redhat.com>2009-04-22 13:54:33 +0300
commit888d256e9c565cb61505bd218eb37c81fe77a325 (patch)
tree4f26b678ab66d958a128f255c6b7a235cd972eb4 /arch
parent7f1ea208968f021943d4103ba59e06bb6d8239cb (diff)
KVM: Unregister cpufreq notifier on unload
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>
Diffstat (limited to 'arch')
-rw-r--r--arch/x86/kvm/x86.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
index a1ecec5c03e9..7c1ce5ac6131 100644
--- a/arch/x86/kvm/x86.c
+++ b/arch/x86/kvm/x86.c
@@ -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();
}