All of lore.kernel.org
 help / color / mirror / Atom feed
* + xen-mask-_page_pcd-from-ptes.patch added to -mm tree
@ 2007-11-16 21:58 akpm
  0 siblings, 0 replies; only message in thread
From: akpm @ 2007-11-16 21:58 UTC (permalink / raw)
  To: mm-commits; +Cc: jeremy, jeremy


The patch titled
     xen: mask _PAGE_PCD from ptes
has been added to the -mm tree.  Its filename is
     xen-mask-_page_pcd-from-ptes.patch

*** Remember to use Documentation/SubmitChecklist when testing your code ***

See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find
out what to do about this

------------------------------------------------------
Subject: xen: mask _PAGE_PCD from ptes
From: Jeremy Fitzhardinge <jeremy@goop.org>

_PAGE_PCD maps a page with caching disabled, which is typically used for
mapping harware registers.  Xen never allows it to be set on a mapping, and
unprivileged guests never need it since they can't see the real underlying
hardware.  However, some uncached mappings are made early when probing the
(non-existent) APIC, and its OK to mask off the PCD flag in these cases.

This became necessary because Xen started checking for this bit, rather
than silently masking it off.

Signed-off-by: Jeremy Fitzhardinge <jeremy@xensource.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 arch/x86/xen/mmu.c |    4 ++++
 1 file changed, 4 insertions(+)

diff -puN arch/x86/xen/mmu.c~xen-mask-_page_pcd-from-ptes arch/x86/xen/mmu.c
--- a/arch/x86/xen/mmu.c~xen-mask-_page_pcd-from-ptes
+++ a/arch/x86/xen/mmu.c
@@ -244,6 +244,8 @@ pte_t xen_make_pte(unsigned long long pt
 	if (pte & 1)
 		pte = phys_to_machine(XPADDR(pte)).maddr;
 
+	pte &= ~_PAGE_PCD;
+
 	return (pte_t){ pte, pte >> 32 };
 }
 
@@ -291,6 +293,8 @@ pte_t xen_make_pte(unsigned long pte)
 	if (pte & _PAGE_PRESENT)
 		pte = phys_to_machine(XPADDR(pte)).maddr;
 
+	pte &= ~_PAGE_PCD;
+
 	return (pte_t){ pte };
 }
 
_

Patches currently in -mm which might be from jeremy@goop.org are

origin.patch
xen-mask-_page_pcd-from-ptes.patch
maps4-simplify-interdependence-of-maps-and-smaps.patch
maps4-move-clear_refs-code-to-task_mmuc.patch
maps4-regroup-task_mmu-by-interface.patch
maps4-add-proc-kpagecount-interface.patch

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2007-11-16 21:58 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-11-16 21:58 + xen-mask-_page_pcd-from-ptes.patch added to -mm tree akpm

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.