Re: How does Xen implement writable page table ?

Jan Beulich
2012-10-04T07:49:28Z

>>> On 03.10.12 at 22:28, Xinxin Jin <xinxinjin89@gmail.com>
wrote:
> Hi everyone,
> If I follow the source code correctly,  fixup_page_fault() ->
> ptwr_do_page_fault handles the write attempts to a page table. In my
> understanding, guests update page table through two ways:
> 1) Issue hypercall update_va_mapping to update PDT;
> 2) Modify writable bottom-level ptes and then trap to Xen''s
> ptwr_do_page_fualt
> Here is my confusion: Why Xen supports two page table updating mechanisms?

This allows balancing between the amount of changes in the guest
side code - basic functionality would only require higher level page
table updates to a para-virtualized, while performance considerations
would call for all of the updates to avoid emulation.

(You also didn''t mention the third method through the
mmu_update hypercall.)

>  Why cannot apply writable page table to PDT entries?

It would at least be troublesome in the hypervisor.

Jan