]> git.baikalelectronics.ru Git - kernel.git/commit
Revert "xen: properly account for _PAGE_NUMA during xen pte translations"
authorDavid Vrabel <david.vrabel@citrix.com>
Tue, 25 Mar 2014 10:38:37 +0000 (10:38 +0000)
committerDavid Vrabel <david.vrabel@citrix.com>
Tue, 25 Mar 2014 11:11:42 +0000 (11:11 +0000)
commit3556c717ea3f2652439660110fcf3cfdb1ec70b5
treef44ee105eb3a1bb59ea098788c6949004438cf41
parent4ef95ee7cacd24d70a846e4c7e9f021cc6e6c776
Revert "xen: properly account for _PAGE_NUMA during xen pte translations"

This reverts commit cd2ca525a1062a9ec3b08e743d776ae68fefdf9b.

PTEs in Xen PV guests must contain machine addresses if _PAGE_PRESENT
is set and pseudo-physical addresses is _PAGE_PRESENT is clear.

This is because during a domain save/restore (migration) the page
table entries are "canonicalised" and uncanonicalised". i.e., MFNs are
converted to PFNs during domain save so that on a restore the page
table entries may be rewritten with the new MFNs on the destination.
This canonicalisation is only done for PTEs that are present.

This change resulted in writing PTEs with MFNs if _PAGE_PROTNONE (or
_PAGE_NUMA) was set but _PAGE_PRESENT was clear.  These PTEs would be
migrated as-is which would result in unexpected behaviour in the
destination domain.  Either a) the MFN would be translated to the
wrong PFN/page; b) setting the _PAGE_PRESENT bit would clear the PTE
because the MFN is no longer owned by the domain; or c) the present
bit would not get set.

Symptoms include "Bad page" reports when munmapping after migrating a
domain.

Signed-off-by: David Vrabel <david.vrabel@citrix.com>
Acked-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Cc: <stable@vger.kernel.org> [3.12+]
arch/x86/include/asm/pgtable.h
arch/x86/xen/mmu.c