* Write bit in Shadow Page Table Entry
@ 2009-07-23 20:49 Lynda Yang
2009-07-26 11:43 ` Avi Kivity
0 siblings, 1 reply; 2+ messages in thread
From: Lynda Yang @ 2009-07-23 20:49 UTC (permalink / raw)
To: kvm
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.
Thank you!,
-Lynda Yang
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Write bit in Shadow Page Table Entry
2009-07-23 20:49 Write bit in Shadow Page Table Entry Lynda Yang
@ 2009-07-26 11:43 ` Avi Kivity
0 siblings, 0 replies; 2+ messages in thread
From: Avi Kivity @ 2009-07-26 11:43 UTC (permalink / raw)
To: Lynda Yang; +Cc: kvm
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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-07-26 11:39 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-07-23 20:49 Write bit in Shadow Page Table Entry Lynda Yang
2009-07-26 11:43 ` Avi Kivity
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).