|
|
|
|
|
|
|
|
|
|
xen-devel
Re: [Xen-devel] Re: Making pages writable again in paging_log_dirty mode
>> (XEN) sh error: sh_remove_shadows(): can't find all shadows of mfn
>> 02673 (shadow_flags=00000008)
Premature declaration of success. I'm still getting the panic above
from this piece of code.
SHADOW_FOREACH_L1E(sl1mfn, sl1e, 0, done_l1,
{
flags_l1 = shadow_l1e_get_flags(*sl1e);
if ((flags_l1 & _PAGE_PRESENT) && !(flags_l1 & _PAGE_RW))
{
mfn = shadow_l1e_get_mfn(*sl1e);
pfn = mfn_to_gfn(v->domain, mfn);
log_dirty_lock(v->domain);
if (mfn_valid(mfn) && VALID_M2P(pfn) &&
sh_mfn_is_dirty(v->domain, mfn))
{
/* hack: because of the external mapping condition
* ref count not incremented when this is called from
* hypercall originating from dom0, need to do it
* manually
*/
struct page_info *page = mfn_to_page(mfn);
if (((page->u.inuse.type_info & PGT_type_mask)
== PGT_writable_page)
&& ((page->u.inuse.type_info & PGT_count_mask) == 0)
&& get_page_type(page, PGT_writable_page))
{
shadow_l1e_t rw_sl1e =
shadow_l1e_add_flags(*sl1e, _PAGE_RW);
shadow_write_entries(sl1e, &rw_sl1e, 1, sl1mfn);
cow.made_rw_count++;
}
}
log_dirty_unlock(v->domain);
}
});
Am I failing to update the page count somewhere? Or are there more
conditions I need to check for the page that I'm adding a RW mapping
to?
Thanks,
Mike
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|
|
|
|
|