From: Xiao Guangrong <xiaoguangrong@cn.fujitsu.com>
To: "Gu, Zhongshu" <gzs715@gmail.com>
Cc: kvm@vger.kernel.org
Subject: Re: Is there shadow page table cache during context switch?
Date: Sat, 10 Jul 2010 19:55:30 +0800 [thread overview]
Message-ID: <4C385FB2.6060402@cn.fujitsu.com> (raw)
In-Reply-To: <AANLkTinIJ2t2R1uu3zi8y0yPO3AqfJLTTH2vUtrj2E8I@mail.gmail.com>
Gu, Zhongshu wrote:
> Hi all:
> Recently i am looking at the code of the implementation of
> shadow page table of kvm. There is one thing that i am confused. Is
> there implementation for caching the shadow page table during context
> switch? From the code, when there is action of setting cr3 in the
> guest os, it will call new_cr3 which will free the mmu roots. When
> entering the guest again, because the root pages are invalid page now,
> it will load mmu and allocate roots again. So for every context
> switch, the shadow page table will be re-constructed. Is that right?
>
Generally, The old mmu root is not freed, is still in shadow page cache,
then when the guest switch to the old root, it can find the corresponding
shadow page form the cache, unless the old root's shadow page is invalid
(it's zapped for the shadow page number control)
next prev parent reply other threads:[~2010-07-10 11:59 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-07-08 19:27 Is there shadow page table cache during context switch? Gu, Zhongshu
2010-07-10 11:55 ` Xiao Guangrong [this message]
2010-07-10 13:11 ` Gu, Zhongshu
2010-07-11 12:12 ` 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=4C385FB2.6060402@cn.fujitsu.com \
--to=xiaoguangrong@cn.fujitsu.com \
--cc=gzs715@gmail.com \
--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