* __direct_map() questions
@ 2012-01-10 19:41 Nick H
2012-01-11 19:13 ` Marcelo Tosatti
0 siblings, 1 reply; 3+ messages in thread
From: Nick H @ 2012-01-10 19:41 UTC (permalink / raw)
To: kvm
Hello All,
I am preparing for a presentation for my community college, newbie to
the kvm world. I am trying to understand kvm implementation. I am
interested in doing a small presentation on kvm and its internals at
my school. I am looking at __direct_map() . I see
for_each_shadow_entry()->shadow_walk_xxx() (called in context of
handle_ept_violation() ) functions using the gfn to find the
iterator.sptep. It passes this iterator.sptep to the mmu_set_spte().
While I can read the code, a few questions:
1. What is the shadow_page_xxx() walk achieving ? Why is this walk necessary ?
2. Which function (mmu_sync_roots()/alloc_roots() ?) populates this table ?
3. If I put a print() around this walk, I see the same gfn's invoking
the walk, finding the same sptep and invoking set_spte(). Why do we
have to do this repeated operation ? (I am talking in context of
handle_ept_violation() ).
4. Is the walk necessary for EPT supporting hardware as well (I am on
a hardware that supports EPT, hence the question) ?
5. Is there any technical literature that talks about these data
structures and help me understand the logic behind them ? If you could
point me to some that will be kind of you.
Thanks in advance and apologies if I am sending this to the wrong
list. Any help appreciated...hopefully questions are not too vague..
Nick
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: __direct_map() questions
2012-01-10 19:41 __direct_map() questions Nick H
@ 2012-01-11 19:13 ` Marcelo Tosatti
2012-01-15 1:36 ` Nick H
0 siblings, 1 reply; 3+ messages in thread
From: Marcelo Tosatti @ 2012-01-11 19:13 UTC (permalink / raw)
To: Nick H; +Cc: kvm
Hi,
See Documentation/virtual/kvm/mmu.txt in the kernel source tree.
On Tue, Jan 10, 2012 at 11:41:41AM -0800, Nick H wrote:
> Hello All,
>
> I am preparing for a presentation for my community college, newbie to
> the kvm world. I am trying to understand kvm implementation. I am
> interested in doing a small presentation on kvm and its internals at
> my school. I am looking at __direct_map() . I see
> for_each_shadow_entry()->shadow_walk_xxx() (called in context of
> handle_ept_violation() ) functions using the gfn to find the
> iterator.sptep. It passes this iterator.sptep to the mmu_set_spte().
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: __direct_map() questions
2012-01-11 19:13 ` Marcelo Tosatti
@ 2012-01-15 1:36 ` Nick H
0 siblings, 0 replies; 3+ messages in thread
From: Nick H @ 2012-01-15 1:36 UTC (permalink / raw)
To: Marcelo Tosatti; +Cc: kvm
On Wed, Jan 11, 2012 at 11:13 AM, Marcelo Tosatti <mtosatti@redhat.com> wrote:
> Hi,
>
> See Documentation/virtual/kvm/mmu.txt in the kernel source tree.
>
Thanks for pointing me in the right direction. Based on some basic
debugging and past kvm forum presentations, shadow page tables fold
the gva->gpa->hpa lookup inside them. In case of EPT what does each
level/each entry of shadow page table hold ?
Thanks in advance,
Nick
> On Tue, Jan 10, 2012 at 11:41:41AM -0800, Nick H wrote:
>> Hello All,
>>
>> I am preparing for a presentation for my community college, newbie to
>> the kvm world. I am trying to understand kvm implementation. I am
>> interested in doing a small presentation on kvm and its internals at
>> my school. I am looking at __direct_map() . I see
>> for_each_shadow_entry()->shadow_walk_xxx() (called in context of
>> handle_ept_violation() ) functions using the gfn to find the
>> iterator.sptep. It passes this iterator.sptep to the mmu_set_spte().
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-01-15 1:36 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-01-10 19:41 __direct_map() questions Nick H
2012-01-11 19:13 ` Marcelo Tosatti
2012-01-15 1:36 ` Nick H
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox