Skip to content

Commit

Permalink
KVM: Unregister cpufreq notifier on unload
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Jan Kiszka authored and Avi Kivity committed Apr 22, 2009
1 parent 7f1ea20 commit 888d256
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions arch/x86/kvm/x86.c
Original file line number Diff line number Diff line change
Expand Up @@ -2775,6 +2775,9 @@ int kvm_arch_init(void *opaque)

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();
}
Expand Down

0 comments on commit 888d256

Please sign in to comment.