From: Marcelo Tosatti <mtosatti@redhat.com>
To: Joerg Roedel <joerg.roedel@amd.com>
Cc: Avi Kivity <avi@redhat.com>, Gerd Hoffmann <kraxel@redhat.com>,
Glauber de Oliveira Costa <gcosta@redhat.com>,
kvm@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] kvm x86: release time_page on vcpu destruction
Date: Wed, 25 Feb 2009 13:13:52 -0300 [thread overview]
Message-ID: <20090225161352.GA6707@amt.cnet> (raw)
In-Reply-To: <1235574511-4571-1-git-send-email-joerg.roedel@amd.com>
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@amd.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.
next prev parent reply other threads:[~2009-02-25 16:14 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-02-25 15:08 [PATCH] kvm x86: release time_page on vcpu destruction Joerg Roedel
2009-02-25 16:13 ` Marcelo Tosatti [this message]
2009-02-26 9:54 ` Avi Kivity
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20090225161352.GA6707@amt.cnet \
--to=mtosatti@redhat.com \
--cc=avi@redhat.com \
--cc=gcosta@redhat.com \
--cc=joerg.roedel@amd.com \
--cc=kraxel@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.