From: Avi Kivity <avi@redhat.com>
To: Lynda Yang <lwithay@gmail.com>
Cc: kvm <kvm@vger.kernel.org>
Subject: Re: Write bit in Shadow Page Table Entry
Date: Sun, 26 Jul 2009 14:43:46 +0300 [thread overview]
Message-ID: <4A6C4172.5010901@redhat.com> (raw)
In-Reply-To: <fecf345b0907231349o7fcdf8djcfeb21c6c8683834@mail.gmail.com>
On 07/23/2009 11:49 PM, Lynda Yang wrote:
> Hi,
> As I understand, the KVM code (kvm-86) may clear the write bit when
> setting a shadow page table entry so that it can detect when an entry
> needs to be marked dirty later. However, it also plays with the write
> bit depending on whether the shadow page is allowed to be unsynched or
> not. I'm not quite clear on the latter, so if anyone can provide some
> insights it would be very much appreciated. Or perhaps even more
> helpful...if it is possible to provide a clear picture of how KVM
> generally plays with an entry's write bit.
>
Let's see.
1. If the spte was derived from a guest pte, then the writeable bit
reflects the guest permissions. If not (nested paging, real mode), the
writeable bit is 1.
2. When we log dirty pages, writeable bits for the memory we are
interested in are cleared.
3. If the spte points at a shadow page, the writeable bit is cleared to
0 so that we are informed of updates to page tables.
4. Under certain conditions[1], we allow a shadowed guest page table to
be writeable. This happens on a write fault to a guest page table.
[1] The conditions are: the page is the lowest-level mapping, and there
are no other uses of the page as a paging element.
--
error compiling committee.c: too many arguments to function
prev parent reply other threads:[~2009-07-26 11:39 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-23 20:49 Write bit in Shadow Page Table Entry Lynda Yang
2009-07-26 11:43 ` Avi Kivity [this message]
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=4A6C4172.5010901@redhat.com \
--to=avi@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=lwithay@gmail.com \
/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;
as well as URLs for NNTP newsgroup(s).