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

Re: [Xen-devel] 2MB page PV guest support clarification





Mick Jordan wrote:
On 02/27/09 17:28, Ian Pratt wrote:
You remark about aliasing prompts me to ask a general question about
that. I am currently mapping physical to virtual 1-1 (because that is
what minis-os has always done) as well as mapping parts of that to
other areas in virtual memory. Both of these are RW mappings. Is that
ok? It perfectly possible for me to unmap the 1-1 mappings or make them
RO if I have to.

Any page that is part of a pagetable must be mapped RO in every mapping to it. 
Attempting to add a page that has RW mappings to a pagetable will fail (either 
when you make the hypercall to add the PTE, or when you pin a constructed 
pagetable or try switching to it).

Thus, you need to be careful with 1:1 maps to remove pages that may become PT pages. It's best to have a PT page allocator that tries to allocate PT's from contiguous regions and then recycles them.

Ok. I need to check this. Certainly I am at some point taking already mapped pages and using them as pagetables. However, I am not getting any errors when adding the PTE. So perhaps the code does the mapping change already.

In mini-os, new_pt_frame() will update the 1:1 mapping to mark a PT page RO before hooking it into the page table.

rolf



Mick


------------------------------------------------------------------------

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

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