[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20090225161352.GA6707@amt.cnet>
Date: Wed, 25 Feb 2009 13:13:52 -0300
From: Marcelo Tosatti <mtosatti@...hat.com>
To: Joerg Roedel <joerg.roedel@....com>
Cc: Avi Kivity <avi@...hat.com>, Gerd Hoffmann <kraxel@...hat.com>,
Glauber de Oliveira Costa <gcosta@...hat.com>,
kvm@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] kvm x86: release time_page on vcpu destruction
On Wed, Feb 25, 2009 at 04:08:31PM +0100, Joerg Roedel wrote:
> Not releasing the time_page causes a leak of that page or the compound
> page it is situated in.
>
> Signed-off-by: Joerg Roedel <joerg.roedel@....com>
> ---
> arch/x86/kvm/x86.c | 5 +++++
> 1 files changed, 5 insertions(+), 0 deletions(-)
>
> diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
> index 8ca100a..a1ecec5 100644
> --- a/arch/x86/kvm/x86.c
> +++ b/arch/x86/kvm/x86.c
> @@ -4159,6 +4159,11 @@ EXPORT_SYMBOL_GPL(kvm_put_guest_fpu);
>
> void kvm_arch_vcpu_free(struct kvm_vcpu *vcpu)
> {
> + if (vcpu->arch.time_page) {
> + kvm_release_page_dirty(vcpu->arch.time_page);
> + vcpu->arch.time_page = NULL;
> + }
> +
> kvm_x86_ops->vcpu_free(vcpu);
> }
Looks good.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists