[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] Re: Making pages writable again in paging_log_dirty mode


  • To: "Tim Deegan" <Tim.Deegan@xxxxxxxxxx>
  • From: "Mike Sun" <msun@xxxxxxxxxx>
  • Date: Mon, 5 Jan 2009 09:24:42 -0500
  • Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
  • Delivery-date: Mon, 05 Jan 2009 06:26:07 -0800
  • Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references:x-google-sender-auth; b=rEM/TWKgWffSwmqKy3Uhq9QFr1D2UiDuNJFWMD1bqHmOjw0M/6qLsOyImd6OD8T1+n ugkeWYN78p1zlNiuAUeWPEkUS5G0x3nTeX+FbSAozQ+XeR2H9JIYogw9YPO5pi65kTP8 zRB2LuTS4I6GFM66MXKWbMlWxLTnfG9Bkjk80=
  • List-id: Xen developer discussion <xen-devel.lists.xensource.com>

> That looks quite strange to me; it will select every dirty page that is
> not currently writeable

Ah yes, I should probably explain what I'm doing.  I'm using the
log-dirty mode to catch any writes to pages that I haven't yet
"copied" via a background copy mechanism, similar to the live
migration copy.  If I have copied it already, then I manually mark it
dirty to indicate that it can be made writable again.  That's what I'm
trying to do in this code.

>  - regardless of whether the guest asked for a writeable mapping
>   (e.g. user-mode read-only maps of kernel structures); and
>  - regardless of whether it's currently shadowed!

Yeah, I've tried adding checks as well (not seen in this version of
the code) to first check the guest PTE to see if it's writable and to
check to see if it's shadowed.  But I also thought that if I check
that that mapped page type was PGT_writable_page with a type count of
0, I could assume that the guest PTE mapped the page as writable, no?

>>                            && get_page_type(page, PGT_writable_page))
>>                        {
>>                            shadow_l1e_t rw_sl1e =
>>                                shadow_l1e_add_flags(*sl1e, _PAGE_RW);
>
> Did you by any chance make this shadow_l1e_add_flags() operator by
> copying l1e_add_flags from asm/page.h?  That's a macro which modifies
> its arguments, which you are definitely not allowed to do to a live
> shadow pagetable. :)

Now this is probably a big problem, that's exactly what I'm doing and
I didn't think about that!  I'll fix that and see what happens.

Thanks for all the help!
Mike

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.