diff options
author | Michael Marineau <marineam@gentoo.org> | 2008-02-23 23:33:39 +0000 |
---|---|---|
committer | Michael Marineau <marineam@gentoo.org> | 2008-02-23 23:33:39 +0000 |
commit | b9ea36c39d989a831dd70d7d79f88de62d013eb7 (patch) | |
tree | a73d1dae055ebdd94e83eac1314a1785920f1c12 /trunk/2.6.22/20039_265-ptep_get_and_clear.patch1 | |
parent | Releasing 2.6.21-2 (diff) | |
download | xen-b9ea36c39d989a831dd70d7d79f88de62d013eb7.tar.gz xen-b9ea36c39d989a831dd70d7d79f88de62d013eb7.tar.bz2 xen-b9ea36c39d989a831dd70d7d79f88de62d013eb7.zip |
Replace the 2.6.22 patches with Suse's xen patchset which actually works. :-)
svn path=/patches/; revision=75
Diffstat (limited to 'trunk/2.6.22/20039_265-ptep_get_and_clear.patch1')
-rw-r--r-- | trunk/2.6.22/20039_265-ptep_get_and_clear.patch1 | 74 |
1 files changed, 74 insertions, 0 deletions
diff --git a/trunk/2.6.22/20039_265-ptep_get_and_clear.patch1 b/trunk/2.6.22/20039_265-ptep_get_and_clear.patch1 new file mode 100644 index 0000000..b7cf4fa --- /dev/null +++ b/trunk/2.6.22/20039_265-ptep_get_and_clear.patch1 @@ -0,0 +1,74 @@ +# HG changeset 265+266 patch +# User Keir Fraser <keir@xensource.com> +# Date 1192720728 -3600 +# Node ID 7837d0ec57bce4578c17018ca1ef1ded64fe1dd3 +# Parent 3116d92146522ae5989b40e1915d0baf6daa1008 +Subject: Fix ptep_get_and_clear() on init_mm pte that is not mapped into +current address space. +Signed-off-by: Keir Fraser <keir@xensource.com> + +Fix ptep_get_and_clear(): atomic operation required on user ptes to +get correct snapshot of A/D bits. + +Signed-off-by: Keir Fraser <keir@xensource.com> + +Acked-by: jbeulich@novell.com + +Index: 10.3-2007-10-22/include/asm-i386/mach-xen/asm/pgtable-2level.h +=================================================================== +--- 10.3-2007-10-22.orig/include/asm-i386/mach-xen/asm/pgtable-2level.h 2007-10-22 13:48:12.000000000 +0200 ++++ 10.3-2007-10-22/include/asm-i386/mach-xen/asm/pgtable-2level.h 2007-10-22 13:52:04.000000000 +0200 +@@ -42,10 +42,9 @@ static inline pte_t ptep_get_and_clear(s + { + pte_t pte = *ptep; + if (!pte_none(pte)) { +- if (mm != &init_mm) ++ if ((mm != &init_mm) || ++ HYPERVISOR_update_va_mapping(addr, __pte(0), 0)) + pte = __pte_ma(xchg(&ptep->pte_low, 0)); +- else +- HYPERVISOR_update_va_mapping(addr, __pte(0), 0); + } + return pte; + } +Index: 10.3-2007-10-22/include/asm-i386/mach-xen/asm/pgtable-3level.h +=================================================================== +--- 10.3-2007-10-22.orig/include/asm-i386/mach-xen/asm/pgtable-3level.h 2007-10-22 13:48:12.000000000 +0200 ++++ 10.3-2007-10-22/include/asm-i386/mach-xen/asm/pgtable-3level.h 2007-10-22 13:52:04.000000000 +0200 +@@ -125,7 +125,8 @@ static inline pte_t ptep_get_and_clear(s + { + pte_t pte = *ptep; + if (!pte_none(pte)) { +- if (mm != &init_mm) { ++ if ((mm != &init_mm) || ++ HYPERVISOR_update_va_mapping(addr, __pte(0), 0)) { + uint64_t val = pte_val_ma(pte); + if (__cmpxchg64(ptep, val, 0) != val) { + /* xchg acts as a barrier before the setting of the high bits */ +@@ -133,8 +134,7 @@ static inline pte_t ptep_get_and_clear(s + pte.pte_high = ptep->pte_high; + ptep->pte_high = 0; + } +- } else +- HYPERVISOR_update_va_mapping(addr, __pte(0), 0); ++ } + } + return pte; + } +Index: 10.3-2007-10-22/include/asm-x86_64/mach-xen/asm/pgtable.h +=================================================================== +--- 10.3-2007-10-22.orig/include/asm-x86_64/mach-xen/asm/pgtable.h 2007-10-22 13:48:12.000000000 +0200 ++++ 10.3-2007-10-22/include/asm-x86_64/mach-xen/asm/pgtable.h 2007-10-22 13:52:04.000000000 +0200 +@@ -282,10 +282,9 @@ static inline pte_t ptep_get_and_clear(s + { + pte_t pte = *ptep; + if (!pte_none(pte)) { +- if (mm != &init_mm) ++ if ((mm != &init_mm) || ++ HYPERVISOR_update_va_mapping(addr, __pte(0), 0)) + pte = __pte_ma(xchg(&ptep->pte, 0)); +- else +- HYPERVISOR_update_va_mapping(addr, __pte(0), 0); + } + return pte; + } |