* Nested Page Faults
@ 2010-05-14 13:15 Matteo Signorini
2010-05-14 14:26 ` Alexander Graf
0 siblings, 1 reply; 3+ messages in thread
From: Matteo Signorini @ 2010-05-14 13:15 UTC (permalink / raw)
To: kvm
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"?
Thanks in advance,
Matteo
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Nested Page Faults
2010-05-14 13:15 Nested Page Faults Matteo Signorini
@ 2010-05-14 14:26 ` Alexander Graf
2010-05-15 14:41 ` Joerg Roedel
0 siblings, 1 reply; 3+ messages in thread
From: Alexander Graf @ 2010-05-14 14:26 UTC (permalink / raw)
To: Matteo Signorini; +Cc: kvm
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,
So it gets handled in pf_interception.
Alex
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: Nested Page Faults
2010-05-14 14:26 ` Alexander Graf
@ 2010-05-15 14:41 ` Joerg Roedel
0 siblings, 0 replies; 3+ messages in thread
From: Joerg Roedel @ 2010-05-15 14:41 UTC (permalink / raw)
To: Alexander Graf; +Cc: Matteo Signorini, kvm
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
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2010-05-15 14:41 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 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).