From patchwork Mon Feb 22 15:52:14 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Graf X-Patchwork-Id: 81168 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o1MFqJbU022703 for ; Mon, 22 Feb 2010 15:52:20 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753950Ab0BVPwQ (ORCPT ); Mon, 22 Feb 2010 10:52:16 -0500 Received: from cantor2.suse.de ([195.135.220.15]:42653 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753807Ab0BVPwP (ORCPT ); Mon, 22 Feb 2010 10:52:15 -0500 Received: from relay2.suse.de (charybdis-ext.suse.de [195.135.221.2]) by mx2.suse.de (Postfix) with ESMTP id 96F9C86EE4; Mon, 22 Feb 2010 16:52:14 +0100 (CET) From: Alexander Graf To: kvm-ppc@vger.kernel.org Cc: kvm list Subject: [PATCH] KVM: PPC: Destory timer on vcpu destruction Date: Mon, 22 Feb 2010 16:52:14 +0100 Message-Id: <1266853934-31883-1-git-send-email-agraf@suse.de> X-Mailer: git-send-email 1.6.0.2 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Mon, 22 Feb 2010 15:52:20 +0000 (UTC) diff --git a/arch/powerpc/kvm/powerpc.c b/arch/powerpc/kvm/powerpc.c index 8902935..5a8eb95 100644 --- a/arch/powerpc/kvm/powerpc.c +++ b/arch/powerpc/kvm/powerpc.c @@ -199,6 +199,10 @@ struct kvm_vcpu *kvm_arch_vcpu_create(struct kvm *kvm, unsigned int id) void kvm_arch_vcpu_free(struct kvm_vcpu *vcpu) { + /* Make sure we're not using the vcpu anymore */ + hrtimer_cancel(&vcpu->arch.dec_timer); + tasklet_kill(&vcpu->arch.tasklet); + kvmppc_remove_vcpu_debugfs(vcpu); kvmppc_core_vcpu_free(vcpu); }