All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Sunil <infinite.questions@gmail.com>
Cc: "kvm@vger.kernel.org" <kvm@vger.kernel.org>
Subject: Re: When is the page table built for migration destination ?
Date: Mon, 09 Sep 2013 11:58:01 +0200	[thread overview]
Message-ID: <522D9BA9.90303@redhat.com> (raw)
In-Reply-To: <CALSEb2fxqHkS_8exXOTKpMxs+jbs1yvDSxGi3Nyk=C8DiKiw9Q@mail.gmail.com>

Il 09/09/2013 11:38, Sunil ha scritto:
> Thanks Paolo.
> 
> I am using KVM with EPT support, so I understand this will require
> gfn->pfn translation.  Going through the code, looks like function
> tdp_page_fault() is responsible for setting up this mapping.
> 
> Though the page table is constructed lazily, I understand the page
> contents are already transferred during migration. Can you please
> explain or point to function names which finds the correct page
> contents for given gfn  ? (looks like pte is created in
> __direct_map())

GFNs are looked up through the memory slots array.  Look at
gfn_to_memslot, gfn_to_hva, and related functions in
virt/kvm/kvm_main.c; also the __gfn_to_memslot and __gfn_to_hva_memslot
inlines in include/linux/kvm_host.h.

Paolo


      reply	other threads:[~2013-09-09  9:57 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-09  5:27 When is the page table built for migration destination ? qna
2013-09-09  8:14 ` Paolo Bonzini
2013-09-09  9:38   ` Sunil
2013-09-09  9:58     ` Paolo Bonzini [this message]

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=522D9BA9.90303@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=infinite.questions@gmail.com \
    --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 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.