This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
Home Products Support Community News


[Xen-devel] Xen MMU's requirement to pin pages RO and initial_memory_map

To: yinghai@xxxxxxxxxx, jeremy@xxxxxxxx, stefano.stabellini@xxxxxxxxxxxxx, hpa@xxxxxxxxx, hpa@xxxxxxxxxxxxxxx, Ian Campbell <Ian.Campbell@xxxxxxxxxxxxx>
Subject: [Xen-devel] Xen MMU's requirement to pin pages RO and initial_memory_mapping.
From: Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>
Date: Fri, 13 May 2011 11:30:10 -0400
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx
Delivery-date: Fri, 13 May 2011 08:31:12 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.5.21 (2010-09-15)
aka, remove the hack added by git commit 
(Merge branch 'stable/bug-fixes-for-rc5' of git://git.kernel.org/../xen)

One idea that is on the table was proposed by Yinghai:
"Xen should set RAM for page-table to RO after init_memory mapping."

In other words, don't do the magic 'mask_rw_pte' when set_pte is called.
(and don't do the calls to make_lowmem_page_readonly when allocating
the PTE table, nor PMD, nor PUD) - I think?

But instead do:
 a). when we load the cr3? We could go through the whole pagetable and
     set the RO as we need?
 b). when we are finished with the creation of a page table? So similary 
     to the point above - don't set the RO on the pages until we have completed
     the full creation of the page.
 c). when post_allocator_start is called?
 d). other ideas?

But I vaguelly recall that we are using the page table as we are adding in the
entries. And that we are pinning them as well. Perhaps the trigger to scan the
pagetable and set them to RO should be done .. at what point? When the PUD/PMD
allocations are done? And when PUD/PMD are set?

Xen-devel mailing list