* Doubts regarding Shadow Page Table Management in KVM
@ 2008-06-10 14:40 Sukanto Ghosh
2008-06-11 5:13 ` Sukanto Ghosh
0 siblings, 1 reply; 3+ messages in thread
From: Sukanto Ghosh @ 2008-06-10 14:40 UTC (permalink / raw)
To: kvm
Hi all,
I was reading the "The shadowy depths of the KVM MMU" presentation by
Avi Kivity.
From my understanding of shadow page-table,
Guest Page Table : maps GV -> GP
Shadow Page Table : maps GV -> HP
What is meant by shadowed guest page ? (Does it refer to : the guest PT
pages that have a corresponding shadow PT page)
I has been mentioned that: "The same page may already be mapped by the
guest in multiple locations. So, we track writable mappings of every
guest page ".
I can't understand why do we have to keep track of these reverse
mappings ? And what are these reverse mappings ? (from HP -> GP or HP ->
GV or GP -> GV)
Let's consider the following scenario:
GVA1 -> GPA1 -> HPA1
GVA2 -> GPA1 -> HPA1
Also, let GPA1 be part of a guest PT page.
i) The guest modifies a PTE in GPA1 by doing "mov GVA2"
ii) The host traps this as the page HPA1 is write-protected, and does
the corresponding modification to the guest PT page and its
corresponding shadow PT page.
(where do we need to use a reverse mapping)
I would be glad if you can point out where I am making the mistake.
--
Thanks & Regards,
Sukanto Ghosh
NB: GVA = guest virtual address GPA = guest physical address
HPA = host physical address
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Doubts regarding Shadow Page Table Management in KVM
2008-06-10 14:40 Doubts regarding Shadow Page Table Management in KVM Sukanto Ghosh
@ 2008-06-11 5:13 ` Sukanto Ghosh
2008-06-12 13:40 ` Avi Kivity
0 siblings, 1 reply; 3+ messages in thread
From: Sukanto Ghosh @ 2008-06-11 5:13 UTC (permalink / raw)
To: kvm
I think I have cleared the issue regarding the reverse mapping.
I missed the fact, that the write permission is associated with the PTE.
I thought that it was associated only with the kernel structures
maintaining the physical page-frame.
But I want to confirm whether a shadowed guest page refers to "the guest
PT page that has a corresponding shadow PT page. And the corresponding
shadow PT page is called the shadow of the former. Am I right ?
Thanks and regards
Sukanto
---
* PT = page table
---
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Doubts regarding Shadow Page Table Management in KVM
2008-06-11 5:13 ` Sukanto Ghosh
@ 2008-06-12 13:40 ` Avi Kivity
0 siblings, 0 replies; 3+ messages in thread
From: Avi Kivity @ 2008-06-12 13:40 UTC (permalink / raw)
To: Sukanto Ghosh; +Cc: kvm
Sukanto Ghosh wrote:
>
> But I want to confirm whether a shadowed guest page refers to "the
> guest PT page that has a corresponding shadow PT page. And the
> corresponding shadow PT page is called the shadow of the former. Am I
> right ?
Yes.
--
I have a truly marvellous patch that fixes the bug which this
signature is too narrow to contain.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2008-06-12 13:42 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-06-10 14:40 Doubts regarding Shadow Page Table Management in KVM Sukanto Ghosh
2008-06-11 5:13 ` Sukanto Ghosh
2008-06-12 13:40 ` Avi Kivity
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox