public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Sukanto Ghosh <sukanto@cse.iitb.ac.in>
To: kvm@vger.kernel.org
Subject: Doubts regarding Shadow Page Table Management in KVM
Date: Tue, 10 Jun 2008 20:10:39 +0530	[thread overview]
Message-ID: <484E9267.9030800@cse.iitb.ac.in> (raw)

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





             reply	other threads:[~2008-06-10 14:44 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-06-10 14:40 Sukanto Ghosh [this message]
2008-06-11  5:13 ` Doubts regarding Shadow Page Table Management in KVM Sukanto Ghosh
2008-06-12 13:40   ` Avi Kivity

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=484E9267.9030800@cse.iitb.ac.in \
    --to=sukanto@cse.iitb.ac.in \
    --cc=kvm@vger.kernel.org \
    /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