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