All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marek Olszewski <mareko@csail.mit.edu>
To: kvm@vger.kernel.org
Subject: Shadow page table questions
Date: Tue, 09 Mar 2010 23:57:11 -0500	[thread overview]
Message-ID: <4B9726A7.7000800@csail.mit.edu> (raw)

Hello,

I was wondering if someone could point me to some documentation that 
explains the basic non-nested-paging shadow page table 
algorithm/strategy used by KVM.  I understand that KVM caches shadow 
page tables across context switches and that there is a reverse mapping 
and page protection to help zap shadow page tables when the guest page 
tables change.  However, I'm not entirely sure how the actual caching is 
done.  At first I assumed that KVM would change the host CR3 on every 
guest context switch such that it would point to a cached shadow page 
table for the currently running guest user thread, however, as far as I 
can tell, the host CR3 does not change so I'm a little lost.  If indeed 
it doesn't change the CR3, how does KVM solve the problem that arises 
when two processes in the guest OS share the same guest logical addresses?

I'm also interested in figuring out what KVM does when running with 
multiple virtual CPUs.  Looking at the code, I can see that each VCPU 
has its own root pointer to a shadow page table graph, but I have yet to 
figure out if this graph has node's shared between VCPUs, or whether 
they are all private.

Any help would be greatly appreciated.  Thanks!

Marek

             reply	other threads:[~2010-03-10  5:02 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-10  4:57 Marek Olszewski [this message]
2010-03-10  9:47 ` Shadow page table questions Avi Kivity
2010-03-11  0:06   ` Marek Olszewski
2010-03-11  6:39     ` Avi Kivity
2010-03-11 16:14       ` Marek Olszewski
2010-03-13  8:51         ` Avi Kivity
2010-03-18 23:50           ` KVM Page Fault Question Marek Olszewski
2010-03-19  8:39             ` Avi Kivity
2010-04-02  4:41               ` Marek Olszewski
2010-04-02  6:39                 ` Avi Kivity
     [not found]                   ` <4BB614BC.9080608@csail.mit.edu>
2010-04-04 16:59                     ` Avi Kivity
2010-04-22  5:26                       ` Marek Olszewski
2010-04-22  6:52                         ` Avi Kivity
     [not found]                           ` <4BD0DFBE.1090103@csail.mit.edu>
2010-04-26  5:42                             ` Marek Olszewski
2010-05-20  2:24                           ` Shadow MMU state preserved across kvm_mmu_zap_all? Marek Olszewski

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=4B9726A7.7000800@csail.mit.edu \
    --to=mareko@csail.mit.edu \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.