Re: [PATCH] i386: For debugging, make the initial page table setup less forgiving.

Zachary Amsden
2007-04-26T03:28:49Z

Eric W. Biederman wrote:
> I suspect what we want to do is come up with a function to call
> to test to see if a page should be read-only and map such pages
> _PAGE_KERNEL_RO, or _PAGE_KERNEL_RO_EXEC if it's code.
>
> Speaking of things what are paravirt_alloc_pd and parafirt_alloc_pd
> supposed to do?
>

For hypervisors which shadow kernel page tables, none of these concerns
with keeping page tables read-only arise. However, another set of
concerns does arise with maintaining shadow synchronization. One of
those problems is keeping the hypervisor aware of when pages are being
used as page tables.

However, it turns out both direct page table and shadow page table
implementations can be made to use one page table allocation function;
in the direct page table case (as for Xen), this is the point where page
tables can be recognized and made read-only. So this is the dual
purpose of the paravirt_alloc_p[dt] functions.

Zach