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

Re: [Xen-devel] Live migration leaves page tables read-only?

Ian Pratt wrote:
I finally ran down the problem. SAP is protecting the pages PROT_NONE,
so the page-present bit in the pte is not set and
canonicalize/uncanonicalize code in save/restore ignore the pte. I've
attached a patch. It is possible that this change should be made to
l1e tests in xc_ptrace.c; I'm not sure.

That's a good catch, thanks. Interesting that we hadn't seen this

Although your patch works today, it will break when we add PSE (super
page) support for PV guests as it will confuse PROT_NONE with PSE.
Assuming PROT_NONE only makes sense for L1 entries, we can probably gate
the tests on whether the page table page is an L1 or not to fix this.

However, it does point out an issue for other OSes: Taking this patch
effectively makes Linux's PROT_NONE (flags 0x80 for a not present PTE)
part of the Xen API. We need to find out whether this is compatible with
*BSD and Solaris' use of flags for not present ptes.


Solaris implements PROT_NONE by entirely invalidating the PTE (ie. it
becomes zero). Hence our PTEs always had either zero or have the PRESENT
bit set.  The only exception to this was adding some fixage to allow
for the old Xen writable page table approach which temporarily made
the upper table non-PRESENT.

So you can make not-present, but non-zero entries mean anything you want.
As long as it's the guest OS that creates the entries, we'll just not do it.


Xen-devel mailing list



Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.