From: Avi Kivity <avi@qumranet.com>
To: Sukanto Ghosh <sukanto@cse.iitb.ac.in>
Cc: kvm@vger.kernel.org
Subject: Re: kvm_mmu doubts
Date: Mon, 30 Jun 2008 22:59:46 +0300 [thread overview]
Message-ID: <48693B32.802@qumranet.com> (raw)
In-Reply-To: <3049.10.9.1.37.1214845847.squirrel@www.cse.iitb.ac.in>
Sukanto Ghosh wrote:
>> Sukanto Ghosh wrote:
>>
>>> What do these refer to ?
>>> i) kvm_rmap_desc
>>>
>> It's a reverse mapping listing all shadow ptes pointing to a given guest
>>
> page.
>
> Then what is the rmap field of the 'struct kvm_memory_slot' ? Is it the
> list of kvm_rmap_desc (one list entry for each guest page in that memory
> slot) ?
>
>
>
The head of this list.
>>> iii) kvm_mmu_page-> spt ??? ( i thought kvm_mmu_page itself refers to page
>>> of shadow PT, then what does spt points to ? )
>>>
>> kvm_mmu_page contains information about the guest page table and the
>>
> host shadow page table. spt is the host shadow page table.
>
>
> I got more confused now.
> I think it is due to terminology. I am novice here and I try to relate
> everything to the OS textbooks.
>
>
Well, that won't work as I haven't read those textbooks.
> I am calling the entire tree-like structure (including the page
> directories) as a page table. In the above statement are you referring to
> the same ? Or is it the last-level table that holds translated physical
> addresses (+ dirty bit, etc ) ?
>
No, any guest page that is part of the structure. Note the structure is
not a tree, since multiple roots exist and as it may be cyclic.
> What about the PGD, PMDs ?
>
We try not to use Linux specific names while describing guests.
> Also, can you explain a line about each of these fields of the
> kvm_mmu_page:
>
> i) link (LRU link of what ?)
>
Yes, the lru link.
> ii) gfn (guest frame number of the guest page table ?)
>
Yes.
> iii) parent_pte (in a multi-level page table structure, the PTE in a page
> directory that holds the base address of the page table)
>
Yes (or a list of those pte pointers).
> iv) root_count ( comment says 'currently serving as an active root; .is
> root = PGD? )
>
Yes.
--
Do not meddle in the internals of kernels, for they are subtle and quick to panic.
next prev parent reply other threads:[~2008-06-30 19:59 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-06-30 13:06 kvm_mmu doubts Sukanto Ghosh
2008-06-30 13:42 ` Avi Kivity
2008-06-30 17:10 ` Sukanto Ghosh
2008-06-30 19:59 ` Avi Kivity [this message]
2008-07-01 5:20 ` Sukanto Ghosh
2008-07-05 10:58 ` Avi Kivity
2008-06-30 14:13 ` Carsten Otte
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=48693B32.802@qumranet.com \
--to=avi@qumranet.com \
--cc=kvm@vger.kernel.org \
--cc=sukanto@cse.iitb.ac.in \
/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