public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Koshelev Vladimir <Vedun-Z@yandex.ru>
To: kvm@vger.kernel.org
Subject: hva_to_pfn and memory leak
Date: Thu, 22 Nov 2012 18:13:26 +0400	[thread overview]
Message-ID: <1030761353593606@web26e.yandex.ru> (raw)

Hello, guys!

I have written paravirtual interface for GPA->HPA translation inside guest. I build GPA->HPA translation table in guest virtual memory. 
To do this, I need to translate userspace virtual address from  memslot to host physical address. I use hva_to_pfn for it. It works fine, but linux doesn't free the guest
memory after guest power off. After testing I have found that cause of memory leak is hva_to_pfg call. You can find my code at http://pastebin.com/0zBV2aPN. 
Do I translate hva to hpa in the right way? 

I do this patch for RHEL Linux Kernel 2.6.32-279.5.2.el6 because I use CentOS 6.3.

Thanks!

Vladimir.




             reply	other threads:[~2012-11-22 18:54 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-22 14:13 Koshelev Vladimir [this message]
2012-11-22 17:02 ` hva_to_pfn and memory leak Koshelev Vladimir

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=1030761353593606@web26e.yandex.ru \
    --to=vedun-z@yandex.ru \
    --cc=kvm@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox