[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: Fri, 2 Jan 2009 11:50:05 -0500
  • Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
  • Delivery-date: Fri, 02 Jan 2009 08:50:30 -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=kUvif9zlxGb+1XQD4BNGAjYE6r8ypsm/It+k5+qud0XhSxDxWVC+x/saYW9bEiCUJf xL48swOgAGYiIZRaWOGREQNdFGMoCMFeOcLus8Md+LlmHzoAfRspaY5QKDNDMAjUevj0 UcrXFQxOpL7drg5GnbPllTL2lTVfixRBDlbG0=
  • List-id: Xen developer discussion <xen-devel.lists.xensource.com>

> IIRC, They should stay as PGT_writeable, with a type count of zero.

Thanks a bunch Tim.  In tracking down my overflow problem, it lead me
to find that that the "get_page_from_l1e()" function has this bit of
code that is causing my problem:

    /* Foreign mappings into guests in shadow external mode don't
     * contribute to writeable mapping refcounts.  (This allows the
     * qemu-dm helper process in dom0 to map the domain's memory without
     * messing up the count of "real" writable mappings.) */
    okay = (((l1f & _PAGE_RW) &&
             !(unlikely(paging_mode_external(d) && (d != curr->domain))))
            ? get_page_and_type(page, d, PGT_writable_page)
            : get_page(page, d));

Basically, I'm trying to make an HVM guest's pages writable again via
a hypercall from dom0, and so this piece of code messes up the type
count since I'm actually changing "proper" writeable mapping
refcounts.  For now, I'm just calling an extra
"get_page_and_type(page, d, PGT_writable_page)" manually, and I think
it solves this problem, but I'm getting a different kind of kernel
panic now where it complains about not being able to
"rm_write_access()" due to some special mappings.  Any ideas?

-- 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®.