From patchwork Fri Apr 17 17:24:58 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Kiszka X-Patchwork-Id: 18713 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n3HHPQUr007666 for ; Fri, 17 Apr 2009 17:25:26 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755962AbZDQRZW (ORCPT ); Fri, 17 Apr 2009 13:25:22 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1756453AbZDQRZW (ORCPT ); Fri, 17 Apr 2009 13:25:22 -0400 Received: from gecko.sbs.de ([194.138.37.40]:21718 "EHLO gecko.sbs.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755761AbZDQRZW (ORCPT ); Fri, 17 Apr 2009 13:25:22 -0400 Received: from mail2.sbs.de (localhost [127.0.0.1]) by gecko.sbs.de (8.12.11.20060308/8.12.11) with ESMTP id n3HHOwvf024534; Fri, 17 Apr 2009 19:24:59 +0200 Received: from [139.25.109.167] (mchn012c.mchp.siemens.de [139.25.109.167] (may be forged)) by mail2.sbs.de (8.12.11.20060308/8.12.11) with ESMTP id n3HHOwvi005342; Fri, 17 Apr 2009 19:24:58 +0200 Message-ID: <49E8BB6A.7080002@siemens.com> Date: Fri, 17 Apr 2009 19:24:58 +0200 From: Jan Kiszka User-Agent: Mozilla/5.0 (X11; U; Linux i686 (x86_64); de; rv:1.8.1.12) Gecko/20080226 SUSE/2.0.0.12-1.1 Thunderbird/2.0.0.12 Mnenhy/0.7.5.666 MIME-Version: 1.0 To: Avi Kivity CC: kvm-devel Subject: [PATCH] kvm: x86: Unregister cpufreq notifier on unload Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org Properly unregister cpufreq notifier on onload if it was registered during init. Signed-off-by: Jan Kiszka --- arch/x86/kvm/x86.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index 0bb4131..95892f7 100644 --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c @@ -2783,6 +2783,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(); }