kvm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Joerg Roedel <joro@8bytes.org>
To: Alexander Graf <agraf@suse.de>
Cc: Matteo Signorini <signorinimatteo@gmail.com>, kvm@vger.kernel.org
Subject: Re: Nested Page Faults
Date: Sat, 15 May 2010 16:41:12 +0200	[thread overview]
Message-ID: <20100515144112.GA19442@8bytes.org> (raw)
In-Reply-To: <95896DAD-AA56-4346-8B2B-5117E6B895DA@suse.de>

On Fri, May 14, 2010 at 04:26:11PM +0200, Alexander Graf wrote:
> 
> On 14.05.2010, at 15:15, Matteo Signorini wrote:
> 
> > Hi to all,
> > 
> > I am working on NPT and have some doubts.
> > Please correct me if I am wrong,
> > 
> > In NPT only the first time a page fault happens it is trapped by the host.
> > The following page faults are not trapped by the host in order to
> > reduce page walk overhead.
> > 
> > My question is...
> > 
> > Which Kvm function handles the "nested page fault"?
> 
> The exit code is SVM_EXIT_NPF. Just search for the handler in svm.c:svm_exit_handlers.
> 
>         [SVM_EXIT_NPF]                          = pf_interception,

Which ends up in tdp_page_fault(). This function calls the generic
__direct_map() handler (that is used for real-mode paging too).
Note that nested page faults are different from guest page faults. Guest
page faults occur for guest virtual addresses (and are handled entirely
inside the guest most of the time) while nested page faults occur for
guest physical addresses and are alway handled by kvm.

	Joerg


      reply	other threads:[~2010-05-15 14:41 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-14 13:15 Nested Page Faults Matteo Signorini
2010-05-14 14:26 ` Alexander Graf
2010-05-15 14:41   ` Joerg Roedel [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=20100515144112.GA19442@8bytes.org \
    --to=joro@8bytes.org \
    --cc=agraf@suse.de \
    --cc=kvm@vger.kernel.org \
    --cc=signorinimatteo@gmail.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;
as well as URLs for NNTP newsgroup(s).