linux/arch/x86/xen
David Vrabel 5926f87fda Revert "xen: properly account for _PAGE_NUMA during xen pte translations"
This reverts commit a9c8e4beee.

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+]
2014-03-25 11:11:42 +00:00
..
apic.c xen/apic/xenbus/swiotlb/pcifront/grant/tmem: Make functions or variables static. 2012-08-21 14:50:03 -04:00
debugfs.c debugfs: Add support to print u32 array in debugfs 2012-04-17 00:18:36 -04:00
debugfs.h debugfs: Add support to print u32 array in debugfs 2012-04-17 00:18:36 -04:00
enlighten.c xen/pvh: set CR4 flags for APs 2014-02-03 15:44:18 -05:00
grant-table.c xen/pvh: Fix misplaced kfree from xlated_setup_gnttab_pages 2014-01-31 09:48:58 -05:00
irq.c Merge branch 'x86-asmlinkage-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2014-01-30 18:15:32 -08:00
Kconfig xen/pvh: Use 'depend' instead of 'select'. 2014-01-10 10:45:35 -05:00
Makefile xen/x86: Implement x86_apic_ops 2012-05-01 14:50:33 -04:00
mmu.c Revert "xen: properly account for _PAGE_NUMA during xen pte translations" 2014-03-25 11:11:42 +00:00
mmu.h xen: make a pile of mmu pvop functions static 2011-05-20 14:25:24 -07:00
multicalls.c xen/multicall: move *idx fields to start of mc_buffer 2011-07-18 15:43:46 -07:00
multicalls.h xen: use this_cpu_xxx replace percpu_xxx funcs 2012-01-24 12:20:24 -05:00
p2m.c Revert "xen/grant-table: Avoid m2p_override during mapping" 2014-02-03 06:44:49 -05:00
pci-swiotlb-xen.c pci-swiotlb-xen: call pci_request_acs only ifdef CONFIG_PCI 2013-11-08 15:21:44 -05:00
platform-pci-unplug.c xen/pvhvm: Remove the xen_platform_pci int. 2014-01-03 14:54:53 -05:00
setup.c Merge branch 'x86-asmlinkage-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2014-01-30 18:15:32 -08:00
smp.c xen/pvh: Set X86_CR0_WP and others in CR0 (v2) 2014-01-21 13:26:05 -05:00
smp.h xen: Clean up apic ipi interface 2013-05-29 09:04:21 -04:00
spinlock.c x86, asmlinkage, xen, kvm: Make {xen,kvm}_lock_spinning global and visible 2014-01-29 22:17:18 -08:00
suspend.c Revert "xen PVonHVM: use E820_Reserved area for shared_info" 2013-02-14 21:29:31 -05:00
time.c xen/x86: set VIRQ_TIMER priority to maximum 2014-01-06 10:07:55 -05:00
trace.c xen/trace: Fix compile error when CONFIG_XEN_PRIVILEGED_GUEST is not set 2011-08-05 09:43:02 -04:00
vdso.h
vga.c xen/vga: add the xen EFI video mode support 2012-09-24 09:28:57 -04:00
xen-asm.h xen: make direct versions of irq_enable/disable/save/restore to common code 2009-02-04 16:59:04 -08:00
xen-asm.S xen: correctly check for pending events when restoring irq flags 2012-04-27 16:04:21 -04:00
xen-asm_32.S x86/xen: don't assume %ds is usable in xen_iret for 32-bit PVOPS. 2013-02-13 15:40:30 -05:00
xen-asm_64.S xen: use iret for return from 64b kernel to 32b usermode 2009-12-03 11:14:54 -08:00
xen-head.S xen/pvh: Support ParaVirtualized Hardware extensions (v3). 2014-01-06 10:44:24 -05:00
xen-ops.h xen/pvh: Set X86_CR0_WP and others in CR0 (v2) 2014-01-21 13:26:05 -05:00