public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Avi Kivity <avi@redhat.com>
To: Gleb Natapov <gleb@redhat.com>
Cc: kvm@vger.kernel.org, mtosatti@redhat.com
Subject: Re: [PATCH unit-tests] Add async page fault test
Date: Wed, 09 May 2012 11:52:41 +0300	[thread overview]
Message-ID: <4FAA3059.2040105@redhat.com> (raw)
In-Reply-To: <20120509084119.GP15960@redhat.com>

On 05/09/2012 11:41 AM, Gleb Natapov wrote:
> > 
> > >  void vfree(void *mem)
> > >  {
> > >      unsigned long size = ((unsigned long *)mem)[-1];
> > > diff --git a/lib/x86/vm.h b/lib/x86/vm.h
> > > index 71ab4a8..ff4842f 100644
> > > --- a/lib/x86/vm.h
> > > +++ b/lib/x86/vm.h
> > > @@ -22,6 +22,7 @@ void vfree(void *mem);
> > >  void *vmap(unsigned long long phys, unsigned long size);
> > >  void *alloc_vpage(void);
> > >  void *alloc_vpages(ulong nr);
> > > +unsigned long virt_to_phys_cr3(void *mem);
> > 
> > uint64_t.
> virt_to_phys() also unsigned long. And get_pte() that virt_to_phys_cr3()
> uses also. I guess the code is not ready for more then 2^32 memory in
> 32bit VM.

It's certainly not enterprise quality yet.  But let's not add more problems.

> > Alterative ways of doing this:
> > - file-backed memory using FUSE to control paging
> Not sure how that can be done.
>
> > - add madvise(MADV_DONTNEED) support to testdev, and have the guest
> > trigger page-in itself.
> MADV_DONTNEED will drop page, not swap it out.

Right, but it will be have to be reloaded from disk (it has to be
file-backed for this to work).  If it's dirty, sync it first.

-- 
error compiling committee.c: too many arguments to function


  reply	other threads:[~2012-05-09  8:52 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-08 11:24 [PATCH unit-tests] Add async page fault test Gleb Natapov
2012-05-09  8:29 ` Avi Kivity
2012-05-09  8:41   ` Gleb Natapov
2012-05-09  8:52     ` Avi Kivity [this message]
2012-05-09  8:59       ` Gleb Natapov
2012-05-09 13:18         ` Takuya Yoshikawa
2012-05-09 13:20           ` Avi Kivity
2012-05-09 13:31             ` Takuya Yoshikawa

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=4FAA3059.2040105@redhat.com \
    --to=avi@redhat.com \
    --cc=gleb@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=mtosatti@redhat.com \
    /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