On 11/29/2011 12:35 PM, Takuya Yoshikawa wrote:
>>> I think it needs more thinking if only less page need be write
>>> protected.
>>>
>>> For example, framebuffer-based device used by Xwindow, only ~64M
>>> pages needs
>>> to be write protected, but in your way, guest will get write page
>>> fault on all
>>> memory? Hmm?
>>>
>>> It has some tricks but i missed?
>
>
> Do you mean write protecting slot by slot is difficult in the case of
> O(1)?
Well, O(1) as outlined protects everything. So if we protect a small
slot, all the others get a penalty.
We used to have a bitmap in a shadow page with a bit set for every slot
pointed to by the page. If we extend this to non-leaf pages (so, when
we set a bit, we propagate it through its parent_ptes list), then we do
the following on write fault:
for each level, from root towards leaf
find index
if if pte(index) is write-protected:
remove write protection
if pte(index) points to a leaf
mark page dirty
else
for each pte in page pointed to by pte(index):
if it is not dirty already, and its slots bitmap indicates
it needs write protection
write protect pte
or something.
--
error compiling committee.c: too many arguments to function
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html